aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-05-05 20:47:57 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-05-06 07:47:40 +0800
commitaa5f3a7962c3b96d1a939a83bf2dacad72d8e898 (patch)
treebe331bbb79e276be844a35f6aada3a355f0abab9
parent22205f36a6213f51f211a67444b335f916a2fa9f (diff)
downloadrneovim-aa5f3a7962c3b96d1a939a83bf2dacad72d8e898.tar.gz
rneovim-aa5f3a7962c3b96d1a939a83bf2dacad72d8e898.tar.bz2
rneovim-aa5f3a7962c3b96d1a939a83bf2dacad72d8e898.zip
vim-patch:8.2.2094: when an expression fails getting next command may be wrong
Problem: When an expression fails getting the next command may be wrong. Solution: Do not check for a next command after :eval fails. (closes vim/vim#7415) https://github.com/vim/vim/commit/d0fe620cbbf5f5e00446efa89893036265c5c302 Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r--src/nvim/eval.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 07f65bbf22..c6a6ef6848 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -2367,7 +2367,10 @@ int eval0(char *arg, typval_T *rettv, exarg_T *eap, evalarg_T *const evalarg)
semsg(_(e_invexpr2), arg);
}
}
- ret = FAIL;
+
+ // Some of the expression may not have been consumed. Do not check for
+ // a next command to avoid more errors.
+ return FAIL;
}
if (eap != NULL) {