diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2023-03-09 13:47:01 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-09 13:47:01 +0800 |
| commit | 3ad845882413944a8d6ed3bd9da68c6b4cee0afb (patch) | |
| tree | 56f889cfd0efd2106b57cfd2dfa171edf0666150 /src/nvim/eval | |
| parent | 89a525de9f2551e460cc91d40fd7afbb7e07622f (diff) | |
| download | rneovim-3ad845882413944a8d6ed3bd9da68c6b4cee0afb.tar.gz rneovim-3ad845882413944a8d6ed3bd9da68c6b4cee0afb.tar.bz2 rneovim-3ad845882413944a8d6ed3bd9da68c6b4cee0afb.zip | |
vim-patch:8.2.1067: expression "!expr->func()" does not work (#22585)
Problem: Expression "!expr->func()" does not work.
Solution: Apply plus and minus earlier. (closes vim/vim#6348)
https://github.com/vim/vim/commit/0b1cd52ff6bf690388f892be686a91721a082e55
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/eval')
| -rw-r--r-- | src/nvim/eval/userfunc.c | 3 | ||||
| -rw-r--r-- | src/nvim/eval/vars.c | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c index 3c4cc34464..13779f4173 100644 --- a/src/nvim/eval/userfunc.c +++ b/src/nvim/eval/userfunc.c @@ -3075,8 +3075,7 @@ void ex_call(exarg_T *eap) } // Handle a function returning a Funcref, Dictionary or List. - if (handle_subscript((const char **)&arg, &rettv, true, true, - (const char *)name, (const char **)&name) + if (handle_subscript((const char **)&arg, &rettv, true, true) == FAIL) { failed = true; break; diff --git a/src/nvim/eval/vars.c b/src/nvim/eval/vars.c index d80bdc70f6..ed2453bd59 100644 --- a/src/nvim/eval/vars.c +++ b/src/nvim/eval/vars.c @@ -508,7 +508,7 @@ static const char *list_arg_vars(exarg_T *eap, const char *arg, int *first) } else { // handle d.key, l[idx], f(expr) const char *const arg_subsc = arg; - if (handle_subscript(&arg, &tv, true, true, name, &name) == FAIL) { + if (handle_subscript(&arg, &tv, true, true) == FAIL) { error = true; } else { if (arg == arg_subsc && len == 2 && name[1] == ':') { @@ -1715,7 +1715,7 @@ bool var_exists(const char *var) n = get_var_tv(name, len, &tv, NULL, false, true) == OK; if (n) { // Handle d.key, l[idx], f(expr). - n = handle_subscript(&var, &tv, true, false, name, &name) == OK; + n = handle_subscript(&var, &tv, true, false) == OK; if (n) { tv_clear(&tv); } |