aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_eval.c
diff options
context:
space:
mode:
authorKillTheMule <KillTheMule@users.noreply.github.com>2016-04-12 21:24:08 +0200
committerKillTheMule <KillTheMule@users.noreply.github.com>2016-04-15 20:17:07 +0200
commit824a6877ea52fad5e29e14129708293840d663a9 (patch)
tree8cf12a8b24baab2838f1e1241d607b120bfd7d7e /src/nvim/ex_eval.c
parent4eb58273cde14f360c41ad98461b423a87ba3fd1 (diff)
downloadrneovim-824a6877ea52fad5e29e14129708293840d663a9.tar.gz
rneovim-824a6877ea52fad5e29e14129708293840d663a9.tar.bz2
rneovim-824a6877ea52fad5e29e14129708293840d663a9.zip
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. https://github.com/vim/vim/commit/768ce2435ae956041579ef2d26e3e9d3a2444e1e 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?
Diffstat (limited to 'src/nvim/ex_eval.c')
-rw-r--r--src/nvim/ex_eval.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/ex_eval.c b/src/nvim/ex_eval.c
index a1e54e74a6..efb031f286 100644
--- a/src/nvim/ex_eval.c
+++ b/src/nvim/ex_eval.c
@@ -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;