aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/screen.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-03-08 13:21:11 +0100
committerJustin M. Keyes <justinkz@gmail.com>2019-03-08 13:21:11 +0100
commit4352d41db0d93ab9266c64be48eda872cb5ea589 (patch)
treea10aa3db77c6db9c7c809200569a9bdd15119f92 /src/nvim/screen.c
parent0355c1ed9c481d4ad3bf24887e0af869834e1b40 (diff)
parent96e2c3945f13453070894c70c74e4da29d421dab (diff)
downloadrneovim-4352d41db0d93ab9266c64be48eda872cb5ea589.tar.gz
rneovim-4352d41db0d93ab9266c64be48eda872cb5ea589.tar.bz2
rneovim-4352d41db0d93ab9266c64be48eda872cb5ea589.zip
Merge #9662 'vim-patch:8.0.{0643-0646}'
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r--src/nvim/screen.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 08bb4e4a52..5255fd2a51 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -5651,13 +5651,15 @@ next_search_hl (
&& cur != NULL
&& shl == &cur->hl
&& cur->match.regprog == cur->hl.rm.regprog);
+ int timed_out = false;
- nmatched = vim_regexec_multi(&shl->rm, win, shl->buf, lnum, matchcol, &(shl->tm));
- /* Copy the regprog, in case it got freed and recompiled. */
+ nmatched = vim_regexec_multi(&shl->rm, win, shl->buf, lnum, matchcol,
+ &(shl->tm), &timed_out);
+ // Copy the regprog, in case it got freed and recompiled.
if (regprog_is_copy) {
cur->match.regprog = cur->hl.rm.regprog;
}
- if (called_emsg || got_int) {
+ if (called_emsg || got_int || timed_out) {
// Error while handling regexp: stop using this regexp.
if (shl == &search_hl) {
// don't free regprog in the match list, it's a copy