0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

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.
This commit is contained in:
Bram Moolenaar
2013-06-05 21:42:53 +02:00
parent 2976c028ca
commit cd2d8bb6ea
3 changed files with 6 additions and 54 deletions

View File

@@ -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;
}