diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2019-10-19 14:17:22 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-19 14:17:22 -0700 |
| commit | 029b828693dbf774e86b6478b5744686d4cdf747 (patch) | |
| tree | 0d94038dfe138f581367458a4b968cad73941be4 /src/nvim/search.c | |
| parent | d89ec55c45e73544c614a3436ae16b9ea17b5535 (diff) | |
| parent | d27fc0825732d575109ce7d149164e86d7b2cb98 (diff) | |
| download | rneovim-029b828693dbf774e86b6478b5744686d4cdf747.tar.gz rneovim-029b828693dbf774e86b6478b5744686d4cdf747.tar.bz2 rneovim-029b828693dbf774e86b6478b5744686d4cdf747.zip | |
Merge #11249 from janlazo/vim-8.1.2151
vim-patch:8.1.{2151,2152,2161,2162,2175,2177,2178}
Diffstat (limited to 'src/nvim/search.c')
| -rw-r--r-- | src/nvim/search.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c index 1f382d31c5..fb31e76986 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -4184,7 +4184,7 @@ static int is_one_char(char_u *pattern, bool move, pos_T *cur, nmatched = vim_regexec_multi(®match, curwin, curbuf, pos.lnum, regmatch.startpos[0].col, NULL, NULL); - if (!nmatched) { + if (nmatched != 0) { break; } } while (direction == FORWARD @@ -4196,7 +4196,10 @@ static int is_one_char(char_u *pattern, bool move, pos_T *cur, && regmatch.startpos[0].lnum == regmatch.endpos[0].lnum && regmatch.startpos[0].col == regmatch.endpos[0].col); // one char width - if (!result && inc(&pos) >= 0 && pos.col == regmatch.endpos[0].col) { + if (!result + && nmatched != 0 + && inc(&pos) >= 0 + && pos.col == regmatch.endpos[0].col) { result = true; } } |