diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-11-06 15:08:24 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-11-06 15:13:42 +0800 |
commit | 95c862095f54d21737ef12f7da689a037e9a1c3e (patch) | |
tree | bbb3799ab94bf2820086af2fba9151cf015b8869 /src | |
parent | 850d7146fc7fb57691641c729d5580b834cd7dd2 (diff) | |
download | rneovim-95c862095f54d21737ef12f7da689a037e9a1c3e.tar.gz rneovim-95c862095f54d21737ef12f7da689a037e9a1c3e.tar.bz2 rneovim-95c862095f54d21737ef12f7da689a037e9a1c3e.zip |
refactor(eval): make get_lval() explicitly check for v:lua
Needed for Vim patch 8.2.3055.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 72df343932..2ce5cd2104 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -1313,8 +1313,15 @@ char *get_lval(char *const name, typval_T *const rettv, lval_T *const lp, const return NULL; } - // Loop until no more [idx] or .key is following. lp->ll_tv = &v->di_tv; + + if (tv_is_luafunc(lp->ll_tv)) { + // For v:lua just return a pointer to the "." after the "v:lua". + // If the caller is trans_function_name() it will check for a Lua function name. + return p; + } + + // Loop until no more [idx] or .key is following. typval_T var1; var1.v_type = VAR_UNKNOWN; typval_T var2; |