diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-08-02 16:00:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-02 08:00:27 +0000 |
commit | 2a3561819e0e80150986779cee87659b7c92d0c1 (patch) | |
tree | 7a207bb4b67abd02eec85580689c7193774f4d59 /src/nvim/eval | |
parent | 76dea5feaa1ab3f2e987ac3ff35238f8e29f2242 (diff) | |
download | rneovim-2a3561819e0e80150986779cee87659b7c92d0c1.tar.gz rneovim-2a3561819e0e80150986779cee87659b7c92d0c1.tar.bz2 rneovim-2a3561819e0e80150986779cee87659b7c92d0c1.zip |
fix(eval): handle wrong v:lua in expr option properly (#29953)
Diffstat (limited to 'src/nvim/eval')
-rw-r--r-- | src/nvim/eval/userfunc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c index f7ce5334f0..d2bae72531 100644 --- a/src/nvim/eval/userfunc.c +++ b/src/nvim/eval/userfunc.c @@ -1779,6 +1779,9 @@ theend: int call_simple_luafunc(const char *funcname, size_t len, typval_T *rettv) FUNC_ATTR_NONNULL_ALL { + rettv->v_type = VAR_NUMBER; // default rettv is number zero + rettv->vval.v_number = 0; + typval_T argvars[1]; argvars[0].v_type = VAR_UNKNOWN; nlua_typval_call(funcname, len, argvars, 0, rettv); |