patch 8.1.0551: expression evaluation may repeat an error message
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.
diff --git a/src/eval.c b/src/eval.c
index a525678..7dfb981 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -8115,7 +8115,7 @@
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 @@
* 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;