Problem: Lua cannot handle a passed in lambda.
Solution: Handle VAR_PARTIAL. (Prabir Shrestha, closes #7937, closes #7936)
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;
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
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2578,
/**/
2577,
/**/