aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-04-16 14:05:09 +0800
committerGitHub <noreply@github.com>2024-04-16 14:05:09 +0800
commit7fa24948a936a95519f0c8c496402488b6508c14 (patch)
treed19db7a1780f17e6a5b15e7950db8c5132231afc /src
parent47ba96a6b3bf22097134b319ed97ec840b05eaa7 (diff)
downloadrneovim-7fa24948a936a95519f0c8c496402488b6508c14.tar.gz
rneovim-7fa24948a936a95519f0c8c496402488b6508c14.tar.bz2
rneovim-7fa24948a936a95519f0c8c496402488b6508c14.zip
test: make mapping tests more consistent (#28368)
- Test maparg() and maplist() in the same test. - Use matches() instead of string.match(). - Avoid overlong lines and strange spacing in exec_lua(). - Revert code change from last PR as the variable may be needed.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/api/private/converter.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/api/private/converter.c b/src/nvim/api/private/converter.c
index a78d78c057..a70ef1e50b 100644
--- a/src/nvim/api/private/converter.c
+++ b/src/nvim/api/private/converter.c
@@ -76,7 +76,8 @@ static Object typval_cbuf_to_obj(EncodedData *edata, const char *data, size_t le
do { \
ufunc_T *fp = find_func(fun); \
if (fp != NULL && (fp->uf_flags & FC_LUAREF)) { \
- kvi_push(edata->stack, LUAREF_OBJ(api_new_luaref(fp->uf_luaref))); \
+ LuaRef ref = api_new_luaref(fp->uf_luaref); \
+ kvi_push(edata->stack, LUAREF_OBJ(ref)); \
} else { \
TYPVAL_ENCODE_CONV_NIL(tv); \
} \