vim-patch:7.4.1282

Problem:    Crash when evaluating the pattern of ":catch" causes an error.
            (Dominique Pelle)
Solution:   Block error messages at this point.

768ce2435a

Applied manually. Could not reproduce the crash both using vim and nvim,
therefore could not device a test.

Should be merged anyways, since it's in vim?
This commit is contained in:
KillTheMule
2016-04-12 21:24:08 +02:00
parent 4eb58273cd
commit 824a6877ea
2 changed files with 67 additions and 1 deletions

View File

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