diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2025-01-23 12:42:38 +0100 |
---|---|---|
committer | luukvbaal <luukvbaal@gmail.com> | 2025-01-24 11:57:51 +0100 |
commit | c6d2cbf8f51abfa0c9d244ef384a15b0b69e16c6 (patch) | |
tree | 08d11c2420f43e240cba1443c3bc750f04d237c6 /src/nvim/lua/executor.c | |
parent | d98827b634af29d74079d1848dd5e8c5d2be1233 (diff) | |
download | rneovim-c6d2cbf8f51abfa0c9d244ef384a15b0b69e16c6.tar.gz rneovim-c6d2cbf8f51abfa0c9d244ef384a15b0b69e16c6.tar.bz2 rneovim-c6d2cbf8f51abfa0c9d244ef384a15b0b69e16c6.zip |
fix(lua): pop retval for fast context LuaRef
Problem: nlua_call_ref_ctx() does not pop the return value in fast
context that did not error.
Solution: Fall through to end; calling nlua_call_pop_retval().
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r-- | src/nvim/lua/executor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c index a5b48a5d5e..71c5cd4585 100644 --- a/src/nvim/lua/executor.c +++ b/src/nvim/lua/executor.c @@ -1587,8 +1587,8 @@ Object nlua_call_ref_ctx(bool fast, LuaRef ref, const char *name, Array args, Lu if (nlua_fast_cfpcall(lstate, nargs, 1, -1) < 0) { // error is already scheduled, set anyways to convey failure. api_set_error(err, kErrorTypeException, "fast context failure"); + return NIL; } - return NIL; } else if (nlua_pcall(lstate, nargs, 1)) { // if err is passed, the caller will deal with the error. if (err) { |