Mercurial > vim
changeset 7973:00344cd730f6 v7.4.1282
commit https://github.com/vim/vim/commit/768ce2435ae956041579ef2d26e3e9d3a2444e1e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Feb 7 19:46:12 2016 +0100
patch 7.4.1282
Problem: Crash when evaluating the pattern of ":catch" causes an error.
(Dominique Pelle)
Solution: Block error messages at this point.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 07 Feb 2016 20:00:04 +0100 |
parents | 629c08a7eaff |
children | fe554d117c7b |
files | src/ex_eval.c src/version.c |
diffstat | 2 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ex_eval.c +++ b/src/ex_eval.c @@ -1562,7 +1562,11 @@ 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;