diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-11-29 21:12:24 -0500 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-11-30 23:35:36 -0500 |
commit | 5de5507ea6877c7ca6054242caa2cb330969db5d (patch) | |
tree | ae6e2a1b17e1eb5cc95ed17c08e274757d9dfe8f /src/nvim/eval.c | |
parent | a9e368a7050c86dff36d80dc1cced21de14dd3ac (diff) | |
download | rneovim-5de5507ea6877c7ca6054242caa2cb330969db5d.tar.gz rneovim-5de5507ea6877c7ca6054242caa2cb330969db5d.tar.bz2 rneovim-5de5507ea6877c7ca6054242caa2cb330969db5d.zip |
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.
https://github.com/vim/vim/commit/76a6345433bc2a600689397fb28165a2e5793720
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index a115e60c7d..3cb0e65701 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -19538,6 +19538,7 @@ void ex_echo(exarg_T *eap) typval_T rettv; bool needclr = true; bool atstart = true; + const int did_emsg_before = did_emsg; if (eap->skip) ++emsg_skip; @@ -19552,7 +19553,7 @@ void ex_echo(exarg_T *eap) // Report the invalid expression unless the expression evaluation // 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; |