]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 7.4.1282 v7.4.1282
authorBram Moolenaar <Bram@vim.org>
Sun, 7 Feb 2016 18:46:12 +0000 (19:46 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 7 Feb 2016 18:46:12 +0000 (19:46 +0100)
Problem:    Crash when evaluating the pattern of ":catch" causes an error.
            (Dominique Pelle)
Solution:   Block error messages at this point.

src/ex_eval.c
src/version.c

index c8e33c2eeeaff6c344136dbb729b6139229307f8..c68c6ad189bb3b77abe92329019e9f9d467b5daa 100644 (file)
@@ -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;
index f95be69e5c10270b8ac3f40e478208cb95a49c7b..ffa3346a2e3e1ca9cdf52b3d2db12d7794b77c11 100644 (file)
@@ -747,6 +747,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1282,
 /**/
     1281,
 /**/