]> granicus.if.org Git - vim/commitdiff
patch 8.1.0551: expression evaluation may repeat an error message v8.1.0551
authorBram Moolenaar <Bram@vim.org>
Wed, 28 Nov 2018 20:20:38 +0000 (21:20 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 28 Nov 2018 20:20:38 +0000 (21:20 +0100)
Problem:    Expression evaluation may repeat an error message. (Jason
            Franklin)
Solution:   Check for the value of did_emsg when giving an error
            for the :execute command.

src/eval.c
src/version.c

index a52567835457302b17cab50e116cdb729a3d2a69..7dfb9812547b037a2bbe74fb846924ab13e2e9b1 100644 (file)
@@ -8115,7 +8115,7 @@ ex_execute(exarg_T *eap)
     char_u     *p;
     garray_T   ga;
     int                len;
-    int                save_did_emsg;
+    int                save_did_emsg = did_emsg;
 
     ga_init2(&ga, 1, 80);
 
@@ -8131,7 +8131,7 @@ ex_execute(exarg_T *eap)
             * has been cancelled due to an aborting error, an interrupt, or an
             * exception.
             */
-           if (!aborting())
+           if (!aborting() && did_emsg == save_did_emsg)
                EMSG2(_(e_invexpr2), p);
            ret = FAIL;
            break;
index d8d66f0ef09a002fa825ac9362c901f0d3b690c3..29f3ec52e0e9077709d2ce9ed2350316ccb0497e 100644 (file)
@@ -792,6 +792,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    551,
 /**/
     550,
 /**/