forked from aniani/vim
patch 8.2.5117: crash when calling a Lua callback from a :def function
Problem: Crash when calling a Lua callback from a :def function. (Bohdan
Makohin)
Solution: Handle FC_CFUNC in call_user_func_check(). (closes #10587)
This commit is contained in:
@@ -664,6 +664,17 @@ func Test_lua_blob()
|
||||
\ '[string "vim chunk"]:1: string expected, got table')
|
||||
endfunc
|
||||
|
||||
def Vim9Test(Callback: func())
|
||||
Callback()
|
||||
enddef
|
||||
|
||||
func Test_call_lua_func_from_vim9_func()
|
||||
" this only tests that Vim doesn't crash
|
||||
lua << EOF
|
||||
vim.fn.Vim9Test(function () print('Hello') end)
|
||||
EOF
|
||||
endfunc
|
||||
|
||||
func Test_lua_funcref()
|
||||
function I(x)
|
||||
return a:x
|
||||
|
||||
Reference in New Issue
Block a user