Skip to content

Commit 8ff5af9

Browse files
committed
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.
1 parent 76a6345 commit 8ff5af9

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/eval.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8115,7 +8115,7 @@ ex_execute(exarg_T *eap)
81158115
char_u *p;
81168116
garray_T ga;
81178117
int len;
8118-
int save_did_emsg;
8118+
int save_did_emsg = did_emsg;
81198119

81208120
ga_init2(&ga, 1, 80);
81218121

@@ -8131,7 +8131,7 @@ ex_execute(exarg_T *eap)
81318131
* has been cancelled due to an aborting error, an interrupt, or an
81328132
* exception.
81338133
*/
8134-
if (!aborting())
8134+
if (!aborting() && did_emsg == save_did_emsg)
81358135
EMSG2(_(e_invexpr2), p);
81368136
ret = FAIL;
81378137
break;

src/version.c

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

793793
static int included_patches[] =
794794
{ /* Add new patch number below this line */
795+
/**/
796+
551,
795797
/**/
796798
550,
797799
/**/

0 commit comments

Comments
 (0)