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

patch 7.4.1282

Problem:    Crash when evaluating the pattern of ":catch" causes an error.
            (Dominique Pelle)
Solution:   Block error messages at this point.
This commit is contained in:
Bram Moolenaar
2016-02-07 19:46:12 +01:00
parent ea8c219ca8
commit 768ce2435a
2 changed files with 6 additions and 0 deletions

View File

@@ -1562,7 +1562,11 @@ ex_catch(exarg_T *eap)
} }
save_cpo = p_cpo; save_cpo = p_cpo;
p_cpo = (char_u *)""; p_cpo = (char_u *)"";
/* Disable error messages, it will make current_exception
* invalid. */
++emsg_off;
regmatch.regprog = vim_regcomp(pat, RE_MAGIC + RE_STRING); regmatch.regprog = vim_regcomp(pat, RE_MAGIC + RE_STRING);
--emsg_off;
regmatch.rm_ic = FALSE; regmatch.rm_ic = FALSE;
if (end != NULL) if (end != NULL)
*end = save_char; *end = save_char;

View File

@@ -747,6 +747,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1282,
/**/ /**/
1281, 1281,
/**/ /**/