diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-11-29 21:19:02 -0500 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-11-30 23:35:36 -0500 |
commit | f59ba0fad0a41951f6ebc427a06b336a5038e5d7 (patch) | |
tree | a5df74373c1ab1faf77534e9b39dcb6128555897 /src/nvim/eval.c | |
parent | 5de5507ea6877c7ca6054242caa2cb330969db5d (diff) | |
download | rneovim-f59ba0fad0a41951f6ebc427a06b336a5038e5d7.tar.gz rneovim-f59ba0fad0a41951f6ebc427a06b336a5038e5d7.tar.bz2 rneovim-f59ba0fad0a41951f6ebc427a06b336a5038e5d7.zip |
vim-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.
https://github.com/vim/vim/commit/8ff5af9544a2abc3d344bba017ef96682e098d9d
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 3cb0e65701..5d2bdc210b 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -19642,7 +19642,7 @@ void ex_execute(exarg_T *eap) int ret = OK; char_u *p; garray_T ga; - int save_did_emsg; + int save_did_emsg = did_emsg; ga_init(&ga, 1, 80); @@ -19656,8 +19656,9 @@ void ex_execute(exarg_T *eap) * has been cancelled due to an aborting error, an interrupt, or an * exception. */ - if (!aborting()) + if (!aborting() && did_emsg == save_did_emsg) { EMSG2(_(e_invexpr2), p); + } ret = FAIL; break; } |