patch 8.2.2578: Lua cannot handle a passed in lambda
Problem: Lua cannot handle a passed in lambda.
Solution: Handle VAR_PARTIAL. (Prabir Shrestha, closes #7937, closes #7936)
diff --git a/src/testdir/test_lua.vim b/src/testdir/test_lua.vim
index 43b4aa3..7de4574 100644
--- a/src/testdir/test_lua.vim
+++ b/src/testdir/test_lua.vim
@@ -121,6 +121,15 @@
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