summaryrefslogtreecommitdiff
path: root/src/regexp.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-06-05 21:42:53 +0200
committerBram Moolenaar <Bram@vim.org>2013-06-05 21:42:53 +0200
commitcd2d8bb6ea55179d69aaf559942133ed8e93341e (patch)
tree3a447d2214216388bee66507dbee3da6d1497648 /src/regexp.c
parent2976c028ca65631825581dcd4e36b56ddc1ae82d (diff)
downloadvim-git-cd2d8bb6ea55179d69aaf559942133ed8e93341e.tar.gz
updated for version 7.3.1128v7.3.1128
Problem: Now that the NFA engine handles everything every failure is a syntax error. Solution: Remove the syntax_error flag.
Diffstat (limited to 'src/regexp.c')
-rw-r--r--src/regexp.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/regexp.c b/src/regexp.c
index 432d7b577..741978e57 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -7924,7 +7924,6 @@ vim_regcomp(expr_arg, re_flags)
regprog_T *prog = NULL;
char_u *expr = expr_arg;
- syntax_error = FALSE;
regexp_engine = p_re;
/* Check for prefix "\%#=", that sets the regexp engine */
@@ -7971,19 +7970,12 @@ vim_regcomp(expr_arg, re_flags)
f = fopen(BT_REGEXP_DEBUG_LOG_NAME, "a");
if (f)
{
- if (!syntax_error)
- fprintf(f, "NFA engine could not handle \"%s\"\n", expr);
- else
- fprintf(f, "Syntax error in \"%s\"\n", expr);
+ fprintf(f, "Syntax error in \"%s\"\n", expr);
fclose(f);
}
else
EMSG2("(NFA) Could not open \"%s\" to write !!!",
BT_REGEXP_DEBUG_LOG_NAME);
- /*
- if (syntax_error)
- EMSG("NFA Regexp: Syntax Error !");
- */
}
#endif
/*
@@ -7992,11 +7984,8 @@ vim_regcomp(expr_arg, re_flags)
* NFA engine.
*/
if (regexp_engine == AUTOMATIC_ENGINE)
- if (!syntax_error)
- prog = bt_regengine.regcomp(expr, re_flags);
-
- } /* endif prog==NULL */
-
+ prog = bt_regengine.regcomp(expr, re_flags);
+ }
return prog;
}