diff options
author | erw7 <erw7.github@gmail.com> | 2019-05-27 19:05:11 +0900 |
---|---|---|
committer | erw7 <erw7.github@gmail.com> | 2019-06-04 09:53:55 +0900 |
commit | 485972dd64317e6a09ce7694cf0f903fb6d13cbd (patch) | |
tree | 6817fab9149d8969ad3eebda7727f29c5b8dcaf9 /src/nvim/eval.c | |
parent | 16b1e8f9c070ad853c6c63b43591e297bf512662 (diff) | |
download | rneovim-485972dd64317e6a09ce7694cf0f903fb6d13cbd.tar.gz rneovim-485972dd64317e6a09ce7694cf0f903fb6d13cbd.tar.bz2 rneovim-485972dd64317e6a09ce7694cf0f903fb6d13cbd.zip |
vim-patch:8.1.0629: "gn" selects the wrong text with a multi-line match
Problem: "gn" selects the wrong text with a multi-line match.
Solution: Get the end position from searchit() directly. (closes vim/vim#3695)
https://github.com/vim/vim/commit/5d24a2257e597fd752e33b2c1e9c19cf9114a517
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index a4606f76f3..49ebf8cef0 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -14139,7 +14139,7 @@ static int search_cmn(typval_T *argvars, pos_T *match_pos, int *flagsp) } pos = save_cursor = curwin->w_cursor; - subpatnum = searchit(curwin, curbuf, &pos, dir, (char_u *)pat, 1, + subpatnum = searchit(curwin, curbuf, &pos, NULL, dir, (char_u *)pat, 1, options, RE_SEARCH, (linenr_T)lnum_stop, &tm, NULL); if (subpatnum != FAIL) { if (flags & SP_SUBPAT) @@ -14657,7 +14657,7 @@ do_searchpair( clearpos(&foundpos); pat = pat3; for (;; ) { - n = searchit(curwin, curbuf, &pos, dir, pat, 1L, + n = searchit(curwin, curbuf, &pos, NULL, dir, pat, 1L, options, RE_SEARCH, lnum_stop, &tm, NULL); if (n == FAIL || (firstpos.lnum != 0 && equalpos(pos, firstpos))) { // didn't find it or found the first match again: FAIL |