search: Fix PVS/V547: condition already checked in surrounding if

This commit is contained in:
ZyX
2018-04-22 19:46:27 +03:00
parent b144a77f38
commit db1c9b625c

View File

@@ -3944,15 +3944,15 @@ current_search (
if (VIsual_active) { if (VIsual_active) {
orig_pos = pos = curwin->w_cursor; orig_pos = pos = curwin->w_cursor;
/* make sure, searching further will extend the match */ // Searching further will extend the match.
if (VIsual_active) { if (forward) {
if (forward) incl(&pos);
incl(&pos); } else {
else decl(&pos);
decl(&pos);
} }
} else } else {
orig_pos = pos = curwin->w_cursor; orig_pos = pos = curwin->w_cursor;
}
/* Is the pattern is zero-width? */ /* Is the pattern is zero-width? */
int one_char = is_one_char(spats[last_idx].pat, true); int one_char = is_one_char(spats[last_idx].pat, true);