Merge #9662 'vim-patch:8.0.{0643-0646}'

This commit is contained in:
Justin M. Keyes
2019-03-08 13:21:11 +01:00
18 changed files with 271 additions and 159 deletions

View File

@@ -13806,7 +13806,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,
options, RE_SEARCH, (linenr_T)lnum_stop, &tm);
options, RE_SEARCH, (linenr_T)lnum_stop, &tm, NULL);
if (subpatnum != FAIL) {
if (flags & SP_SUBPAT)
retval = subpatnum;
@@ -14308,10 +14308,11 @@ do_searchpair(
pat = pat3;
for (;; ) {
n = searchit(curwin, curbuf, &pos, dir, pat, 1L,
options, RE_SEARCH, lnum_stop, &tm);
if (n == FAIL || (firstpos.lnum != 0 && equalpos(pos, firstpos)))
/* didn't find it or found the first match again: FAIL */
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
break;
}
if (firstpos.lnum == 0)
firstpos = pos;