diff options
author | ZyX <kp-pav@yandex.ru> | 2018-04-22 19:46:27 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2018-04-22 19:46:27 +0300 |
commit | db1c9b625cd200a9ed2fc8dc842eb76a329eb144 (patch) | |
tree | 1b1aace502ad969c6b84c12aa69578d2b2f704a4 | |
parent | b144a77f380a8ec5d7579ee888bf051617cf3dfb (diff) | |
download | rneovim-db1c9b625cd200a9ed2fc8dc842eb76a329eb144.tar.gz rneovim-db1c9b625cd200a9ed2fc8dc842eb76a329eb144.tar.bz2 rneovim-db1c9b625cd200a9ed2fc8dc842eb76a329eb144.zip |
search: Fix PVS/V547: condition already checked in surrounding if
-rw-r--r-- | src/nvim/search.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c index 102a42fe15..3b726b6d08 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -3944,15 +3944,15 @@ current_search ( if (VIsual_active) { orig_pos = pos = curwin->w_cursor; - /* make sure, searching further will extend the match */ - if (VIsual_active) { - if (forward) - incl(&pos); - else - decl(&pos); + // Searching further will extend the match. + if (forward) { + incl(&pos); + } else { + decl(&pos); } - } else + } else { orig_pos = pos = curwin->w_cursor; + } /* Is the pattern is zero-width? */ int one_char = is_one_char(spats[last_idx].pat, true); |