Skip to content

Commit 768ce24

Browse files
committed
patch 7.4.1282
Problem: Crash when evaluating the pattern of ":catch" causes an error. (Dominique Pelle) Solution: Block error messages at this point.
1 parent ea8c219 commit 768ce24

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/ex_eval.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,7 +1562,11 @@ ex_catch(exarg_T *eap)
15621562
}
15631563
save_cpo = p_cpo;
15641564
p_cpo = (char_u *)"";
1565+
/* Disable error messages, it will make current_exception
1566+
* invalid. */
1567+
++emsg_off;
15651568
regmatch.regprog = vim_regcomp(pat, RE_MAGIC + RE_STRING);
1569+
--emsg_off;
15661570
regmatch.rm_ic = FALSE;
15671571
if (end != NULL)
15681572
*end = save_char;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,8 @@ static char *(features[]) =
747747

748748
static int included_patches[] =
749749
{ /* Add new patch number below this line */
750+
/**/
751+
1282,
750752
/**/
751753
1281,
752754
/**/

0 commit comments

Comments
 (0)