diff options
-rw-r--r-- | src/if_lua.c | 5 | ||||
-rw-r--r-- | src/testdir/test_lua.vim | 9 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 16 insertions, 0 deletions
diff --git a/src/if_lua.c b/src/if_lua.c index e20298311d..abcd850b3d 100644 --- a/src/if_lua.c +++ b/src/if_lua.c @@ -568,6 +568,11 @@ luaV_pushtypval(lua_State *L, typval_T *tv) case VAR_FUNC: luaV_pushfuncref(L, tv->vval.v_string); break; + case VAR_PARTIAL: + // TODO: handle partial arguments + luaV_pushfuncref(L, partial_name(tv->vval.v_partial)); + break; + case VAR_BLOB: luaV_pushblob(L, tv->vval.v_blob); break; diff --git a/src/testdir/test_lua.vim b/src/testdir/test_lua.vim index 43b4aa30ff..7de4574530 100644 --- a/src/testdir/test_lua.vim +++ b/src/testdir/test_lua.vim @@ -121,6 +121,15 @@ func Test_lua_eval() lua v = nil endfunc +" Test luaeval() with lambda +func Test_luaeval_with_lambda() + lua function hello_luaeval_lambda(a, cb) return a .. cb() end + call assert_equal('helloworld', + \ luaeval('hello_luaeval_lambda(_A[1], _A[2])', + \ ['hello', {->'world'}])) + lua hello_luaeval_lambda = nil +endfunc + " Test vim.window() func Test_lua_window() e Xfoo2 diff --git a/src/version.c b/src/version.c index f7c2171de6..6c9617596b 100644 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2578, +/**/ 2577, /**/ 2576, |