summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-11-28 21:20:38 +0100
committerBram Moolenaar <Bram@vim.org>2018-11-28 21:20:38 +0100
commit8ff5af9544a2abc3d344bba017ef96682e098d9d (patch)
treeafc4d2547fe9d9a18ce1f6cdb8d8f5272b82aad7 /src/eval.c
parent76a6345433bc2a600689397fb28165a2e5793720 (diff)
patch 8.1.0551: expression evaluation may repeat an error messagev8.1.0551
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.
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c
index a525678354..7dfb981254 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -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;