diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-12-26 07:02:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-26 07:02:44 +0100 |
commit | 927a4f24e09e879ae1006aab32ead81985c61865 (patch) | |
tree | 5e1ead3a895263522c061d9de733514a86476f41 /src/nvim/ex_cmds.c | |
parent | 5f1aec5abdb551e5f3035ca054d36580b3233efb (diff) | |
parent | 234c4a846bc78b2cc119b72b994b3ac3f401c8c3 (diff) | |
download | rneovim-927a4f24e09e879ae1006aab32ead81985c61865.tar.gz rneovim-927a4f24e09e879ae1006aab32ead81985c61865.tar.bz2 rneovim-927a4f24e09e879ae1006aab32ead81985c61865.zip |
Merge #11612 from janlazo/clang-pvs
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r-- | src/nvim/ex_cmds.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 0c3b467612..85048427b1 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -3249,7 +3249,6 @@ static void extmark_move_regmatch_single(lpos_T startpos, static void extmark_move_regmatch_multi(ExtmarkSubMulti s, long i) { colnr_T mincol; - linenr_T u_lnum; mincol = s.startpos.col + 1; linenr_T n_u_lnum = s.lnum + s.endpos.lnum - s.startpos.lnum; @@ -3266,7 +3265,7 @@ static void extmark_move_regmatch_multi(ExtmarkSubMulti s, long i) // -- Delete Pattern -- // 1. Move marks in the pattern mincol = s.startpos.col + 1; - u_lnum = n_u_lnum; + linenr_T u_lnum = n_u_lnum; assert(n_u_lnum == u_lnum); extmark_copy_and_place(curbuf, s.lnum, mincol, @@ -3311,7 +3310,6 @@ static void extmark_move_regmatch_multi(ExtmarkSubMulti s, long i) assert(s.startpos.lnum == 0); mincol = s.startpos.col + 1; - u_lnum = n_u_lnum; if (!s.newline_in_pat && s.newline_in_sub) { // -- Delete Pattern -- @@ -4947,17 +4945,21 @@ help_heuristic( * If the match is more than 2 chars from the start, multiply by 200 to * put it after matches at the start. */ - if (ASCII_ISALNUM(matched_string[offset]) && offset > 0 - && ASCII_ISALNUM(matched_string[offset - 1])) + if (offset > 0 + && ASCII_ISALNUM(matched_string[offset]) + && ASCII_ISALNUM(matched_string[offset - 1])) { offset += 10000; - else if (offset > 2) + } else if (offset > 2) { offset *= 200; - if (wrong_case) + } + if (wrong_case) { offset += 5000; - /* Features are less interesting than the subjects themselves, but "+" - * alone is not a feature. */ - if (matched_string[0] == '+' && matched_string[1] != NUL) + } + // Features are less interesting than the subjects themselves, but "+" + // alone is not a feature. + if (matched_string[0] == '+' && matched_string[1] != NUL) { offset += 100; + } return (int)(100 * num_letters + STRLEN(matched_string) + offset); } |