From cd2d8bb6ea55179d69aaf559942133ed8e93341e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 5 Jun 2013 21:42:53 +0200 Subject: updated for version 7.3.1128 Problem: Now that the NFA engine handles everything every failure is a syntax error. Solution: Remove the syntax_error flag. --- src/regexp.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'src/regexp.c') 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; } -- cgit v1.2.1