summaryrefslogtreecommitdiffstats
path: root/src/evalfunc.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-12-23 19:10:09 +0100
committerBram Moolenaar <Bram@vim.org>2018-12-23 19:10:09 +0100
commit5d24a2257e597fd752e33b2c1e9c19cf9114a517 (patch)
tree10c6203d3f704fa189e1b52e9af5df62a6831fc8 /src/evalfunc.c
parentc33181c44ccb86637e011f35cc0397a2d76e23ae (diff)
patch 8.1.0629: "gn" selects the wrong text with a multi-line matchv8.1.0629
Problem: "gn" selects the wrong text with a multi-line match. Solution: Get the end position from searchit() directly. (closes #3695)
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r--src/evalfunc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c
index bd2acef7fd..99e68f7e50 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -10056,7 +10056,7 @@ search_cmn(typval_T *argvars, pos_T *match_pos, int *flagsp)
}
pos = save_cursor = curwin->w_cursor;
- subpatnum = searchit(curwin, curbuf, &pos, dir, pat, 1L,
+ subpatnum = searchit(curwin, curbuf, &pos, NULL, dir, pat, 1L,
options, RE_SEARCH, (linenr_T)lnum_stop, &tm, NULL);
if (subpatnum != FAIL)
{
@@ -10414,7 +10414,7 @@ do_searchpair(
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 && EQUAL_POS(pos, firstpos)))
/* didn't find it or found the first match again: FAIL */