NULL, NULL
#endif
);
+ // vim_regexec_multi() may clear "regprog"
+ if (regmatch.regprog == NULL)
+ break;
// Abort searching on an error (e.g., out of stack).
if (called_emsg > called_emsg_before
#ifdef FEAT_RELTIME
match_ok = FALSE;
break;
}
+ // vim_regexec_multi() may clear "regprog"
+ if (regmatch.regprog == NULL)
+ break;
matchpos = regmatch.startpos[0];
endpos = regmatch.endpos[0];
# ifdef FEAT_EVAL
#endif
break;
}
+ // vim_regexec_multi() may clear "regprog"
+ if (regmatch.regprog == NULL)
+ break;
// Need to get the line pointer again, a
// multi-line search may have made it invalid.
}
at_first_line = FALSE;
+ // vim_regexec_multi() may clear "regprog"
+ if (regmatch.regprog == NULL)
+ break;
+
/*
* Stop the search if wrapscan isn't set, "stop_lnum" is
* specified, after an interrupt, after a match and after looping
pos.lnum, regmatch.startpos[0].col, NULL, NULL);
if (nmatched != 0)
break;
- } while (direction == FORWARD ? regmatch.startpos[0].col < pos.col
+ } while (regmatch.regprog != NULL
+ && direction == FORWARD ? regmatch.startpos[0].col < pos.col
: regmatch.startpos[0].col > pos.col);
if (called_emsg == called_emsg_before)
call Incsearch_cleanup()
endfunc
+func Test_incsearch_substitute_long_line()
+ new
+ call test_override("char_avail", 1)
+ set incsearch
+
+ call repeat('x', 100000)->setline(1)
+ call feedkeys(':s/\%c', 'xt')
+ redraw
+ call feedkeys("\<Esc>", 'xt')
+
+ call Incsearch_cleanup()
+ bwipe!
+endfunc
+
" Similar to Test_incsearch_substitute() but with a screendump halfway.
func Test_incsearch_substitute_dump()
CheckOption incsearch