vim-patch:9.0.0095: conditions are always true

Problem:    Conditions are always true.
Solution:   Remove useless conditions. (closes vim/vim#10802)
122dea7007
This commit is contained in:
zeertzjq
2022-07-28 06:32:07 +08:00
parent e0eebe3087
commit e6b7f70294
2 changed files with 3 additions and 3 deletions

View File

@@ -3470,7 +3470,7 @@ int build_stl_str_hl(win_T *wp, char *out, size_t outlen, char *fmt, int use_san
// Proceed character by character through the statusline format string // Proceed character by character through the statusline format string
// fmt_p is the current position in the input buffer // fmt_p is the current position in the input buffer
for (char *fmt_p = usefmt; *fmt_p;) { for (char *fmt_p = usefmt; *fmt_p != NUL;) {
if (curitem == (int)stl_items_len) { if (curitem == (int)stl_items_len) {
size_t new_len = stl_items_len * 3 / 2; size_t new_len = stl_items_len * 3 / 2;
@@ -3484,7 +3484,7 @@ int build_stl_str_hl(win_T *wp, char *out, size_t outlen, char *fmt, int use_san
stl_items_len = new_len; stl_items_len = new_len;
} }
if (*fmt_p != NUL && *fmt_p != '%') { if (*fmt_p != '%') {
prevchar_isflag = prevchar_isitem = false; prevchar_isflag = prevchar_isitem = false;
} }

View File

@@ -3569,7 +3569,7 @@ term_again:
// Are we at the start of a cpp base class declaration or // Are we at the start of a cpp base class declaration or
// constructor initialization? XXX // constructor initialization? XXX
n = 0; n = 0;
if (curbuf->b_ind_cpp_baseclass != 0 && theline[0] != '{') { if (curbuf->b_ind_cpp_baseclass != 0) {
n = cin_is_cpp_baseclass(&cache_cpp_baseclass); n = cin_is_cpp_baseclass(&cache_cpp_baseclass);
l = get_cursor_line_ptr(); l = get_cursor_line_ptr();
} }