1
0
forked from aniani/vim

patch 8.1.0550: expression evaluation may repeat an error message

Problem:    Expression evaluation may repeat an error message. (Jason
            Franklin)
Solution:   Increment did_emsg and check for the value when giving an error
            for the echo command.
This commit is contained in:
Bram Moolenaar
2018-11-28 20:38:37 +01:00
parent 10efcd5b02
commit 76a6345433
4 changed files with 6 additions and 5 deletions

View File

@@ -7999,6 +7999,7 @@ ex_echo(exarg_T *eap)
int needclr = TRUE;
int atstart = TRUE;
char_u numbuf[NUMBUFLEN];
int did_emsg_before = did_emsg;
if (eap->skip)
++emsg_skip;
@@ -8016,7 +8017,7 @@ ex_echo(exarg_T *eap)
* has been cancelled due to an aborting error, an interrupt, or an
* exception.
*/
if (!aborting())
if (!aborting() && did_emsg == did_emsg_before)
EMSG2(_(e_invexpr2), p);
need_clr_eos = FALSE;
break;