aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/ui_event_spec.lua
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2025-01-23 12:42:38 +0100
committerluukvbaal <luukvbaal@gmail.com>2025-01-24 11:57:51 +0100
commitc6d2cbf8f51abfa0c9d244ef384a15b0b69e16c6 (patch)
tree08d11c2420f43e240cba1443c3bc750f04d237c6 /test/functional/lua/ui_event_spec.lua
parentd98827b634af29d74079d1848dd5e8c5d2be1233 (diff)
downloadrneovim-c6d2cbf8f51abfa0c9d244ef384a15b0b69e16c6.tar.gz
rneovim-c6d2cbf8f51abfa0c9d244ef384a15b0b69e16c6.tar.bz2
rneovim-c6d2cbf8f51abfa0c9d244ef384a15b0b69e16c6.zip
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().
Diffstat (limited to 'test/functional/lua/ui_event_spec.lua')
-rw-r--r--test/functional/lua/ui_event_spec.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/lua/ui_event_spec.lua b/test/functional/lua/ui_event_spec.lua
index 8bfd574fb9..80457555d4 100644
--- a/test/functional/lua/ui_event_spec.lua
+++ b/test/functional/lua/ui_event_spec.lua
@@ -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)