Patch 9.0.0095
Problem: Conditions are always true.
Solution: Remove useless conditions. (closes #10802)
Files: src/buffer.c, src/cindent.c
*** ../vim-9.0.0094/src/buffer.c 2022-07-25 19:07:01.097953885 +0100
--- src/buffer.c 2022-07-27 15:42:44.007590743 +0100
***************
*** 4297,4303 ****
curitem = 0;
prevchar_isflag = TRUE;
prevchar_isitem = FALSE;
! for (s = usefmt; *s; )
{
if (curitem == (int)stl_items_len)
{
--- 4297,4303 ----
curitem = 0;
prevchar_isflag = TRUE;
prevchar_isitem = FALSE;
! for (s = usefmt; *s != NUL; )
{
if (curitem == (int)stl_items_len)
{
***************
*** 4327,4333 ****
stl_items_len = new_len;
}
! if (*s != NUL && *s != '%')
prevchar_isflag = prevchar_isitem = FALSE;
/*
--- 4327,4333 ----
stl_items_len = new_len;
}
! if (*s != '%')
prevchar_isflag = prevchar_isitem = FALSE;
/*
*** ../vim-9.0.0094/src/cindent.c 2022-06-30 22:13:56.204846337 +0100
--- src/cindent.c 2022-07-27 15:47:35.479926320 +0100
***************
*** 2267,2273 ****
}
// If the start comment string doesn't match with the
// start of the comment, skip this entry. XXX
! else if (STRNCMP(ml_get(comment_pos->lnum) +
comment_pos->col,
lead_start, lead_start_len) != 0)
continue;
}
--- 2267,2274 ----
}
// If the start comment string doesn't match with the
// start of the comment, skip this entry. XXX
! else if (STRNCMP(ml_get(comment_pos->lnum)
! + comment_pos->col,
lead_start, lead_start_len) != 0)
continue;
}
***************
*** 3717,3723 ****
// Are we at the start of a cpp base class declaration or
// constructor initialization? XXX
n = FALSE;
! if (curbuf->b_ind_cpp_baseclass != 0 && theline[0] != '{')
{
n = cin_is_cpp_baseclass(&cache_cpp_baseclass);
l = ml_get_curline();
--- 3718,3724 ----
// Are we at the start of a cpp base class declaration or
// constructor initialization? XXX
n = FALSE;
! if (curbuf->b_ind_cpp_baseclass != 0)
{
n = cin_is_cpp_baseclass(&cache_cpp_baseclass);
l = ml_get_curline();
*** ../vim-9.0.0094/src/version.c 2022-07-27 15:23:32.272483068 +0100
--- src/version.c 2022-07-27 15:43:33.115676509 +0100
***************
*** 737,738 ****
--- 737,740 ----
{ /* Add new patch number below this line */
+ /**/
+ 95,
/**/
--
Although the scythe isn't pre-eminent among the weapons of war, anyone who
has been on the wrong end of, say, a peasants' revolt will know that in
skilled hands it is fearsome.
-- (Terry Pratchett, Mort)
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220727145125.436451C0A39%40moolenaar.net.