# HG changeset patch # User Bram Moolenaar # Date 1377442902 -7200 # Node ID b04bdb2c5fce70a278d26c477debb65a388da0ca # Parent 2ee5e568766c7ddffd0fd7f6d0fc487a13fd6d20 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 --- 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 --- 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 --- a/src/version.c +++ b/src/version.c @@ -728,6 +728,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 8, +/**/ 7, /**/ 6,