Mercurial > vim
diff src/eval.c @ 15079:a527110d5f56 v8.1.0550
patch 8.1.0550: expression evaluation may repeat an error message
commit https://github.com/vim/vim/commit/76a6345433bc2a600689397fb28165a2e5793720
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Nov 28 20:38:37 2018 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 28 Nov 2018 20:45:07 +0100 |
parents | c5ec5ddbe814 |
children | 0d2138d4c1dc |
line wrap: on
line diff
--- a/src/eval.c +++ b/src/eval.c @@ -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;