fix(lua): pop retval for fast context LuaRef

Problem:  nlua_call_ref_ctx() does not pop the return value in fast
          context that did not error.
Solution: Fall through to end; calling nlua_call_pop_retval().
This commit is contained in:
Luuk van Baal
2025-01-23 12:42:38 +01:00
committed by luukvbaal
parent d98827b634
commit c6d2cbf8f5
2 changed files with 10 additions and 1 deletions

View File

@@ -423,4 +423,13 @@ describe('vim.ui_attach', function()
{100:Press ENTER or type command to continue}^ |
]])
end)
it('sourcing invalid file does not crash #32166', function()
exec_lua([[
local ns = vim.api.nvim_create_namespace("")
vim.ui_attach(ns, { ext_messages = true }, function() end)
]])
feed((':luafile %s<CR>'):format(testlog))
n.assert_alive()
end)
end)