mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 22:38:16 +00:00
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.
76a6345433
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user