aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-03-12 08:02:58 +0800
committerGitHub <noreply@github.com>2023-03-12 08:02:58 +0800
commit714f6bf249fc6a9e6e389fafebdab3719bc06e71 (patch)
treec92cca1f38a49f675233be410ffe1a5b48a4a7b1
parent9d574f8dd7248a4cf8dcbe615f3058d34efb7ac3 (diff)
downloadrneovim-714f6bf249fc6a9e6e389fafebdab3719bc06e71.tar.gz
rneovim-714f6bf249fc6a9e6e389fafebdab3719bc06e71.tar.bz2
rneovim-714f6bf249fc6a9e6e389fafebdab3719bc06e71.zip
vim-patch:9.0.1401: condition is always true (#22638)
Problem: Condition is always true. Solution: Remove the condition. (closes vim/vim#12139) https://github.com/vim/vim/commit/c481ad38f05c9f759ca7fd01a54c78acad794e85
-rw-r--r--src/nvim/eval.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 384e088bcf..14f2379504 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -6951,14 +6951,12 @@ int handle_subscript(const char **const arg, typval_T *rettv, int evaluate, int
tv_dict_unref(selfdict);
selfdict = NULL;
} else if (**arg == '-') {
- if (ret == OK) {
- if ((*arg)[2] == '{') {
- // expr->{lambda}()
- ret = eval_lambda((char **)arg, rettv, evaluate, verbose);
- } else {
- // expr->name()
- ret = eval_method((char **)arg, rettv, evaluate, verbose);
- }
+ if ((*arg)[2] == '{') {
+ // expr->{lambda}()
+ ret = eval_lambda((char **)arg, rettv, evaluate, verbose);
+ } else {
+ // expr->name()
+ ret = eval_method((char **)arg, rettv, evaluate, verbose);
}
} else { // **arg == '[' || **arg == '.'
tv_dict_unref(selfdict);