From: Bram Moolenaar Date: Sun, 25 Aug 2013 15:01:42 +0000 (+0200) Subject: updated for version 7.4.008 X-Git-Tag: v7.4.008 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=41f1205fef7eb24656abb3eeb1dea9ff5cdf1b62;p=vim updated for version 7.4.008 Problem: New regexp engine can't be interrupted. Solution: Check for CTRL-C pressed. (Yasuhiro Matsumoto) --- diff --git a/src/regexp.c b/src/regexp.c index 06bbb4a54..df884e25b 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -4311,8 +4311,8 @@ regmatch(scan) */ for (;;) { - /* Some patterns may cause a long time to match, even though they are not - * illegal. E.g., "\([a-z]\+\)\+Q". Allow breaking them with CTRL-C. */ + /* Some patterns may take a long time to match, e.g., "\([a-z]\+\)\+Q". + * Allow interrupting them with CTRL-C. */ fast_breakcheck(); #ifdef DEBUG diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index 57539f4e5..5288eb6d3 100644 --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -5089,6 +5089,12 @@ nfa_regmatch(prog, start, submatch, m) return FALSE; } #endif + /* Some patterns may take a long time to match, especially when using + * recursive_regmatch(). Allow interrupting them with CTRL-C. */ + fast_breakcheck(); + if (got_int) + return FALSE; + nfa_match = FALSE; /* Allocate memory for the lists of nodes. */ diff --git a/src/version.c b/src/version.c index d34ed63dd..22fc9b961 100644 --- a/src/version.c +++ b/src/version.c @@ -727,6 +727,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 8, /**/ 7, /**/