diff options
author | notomo <notomo.motono@gmail.com> | 2022-09-16 18:06:37 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-16 11:06:37 +0200 |
commit | 754822a066e6ce92462aa17fce8999472c23b777 (patch) | |
tree | a58d8cf6c47224eee69df4a84b085435de6081e3 /test/functional/lua/ui_event_spec.lua | |
parent | 0c0071548b4b598dcc4f9836703b1a7b0dc7c007 (diff) | |
download | rneovim-754822a066e6ce92462aa17fce8999472c23b777.tar.gz rneovim-754822a066e6ce92462aa17fce8999472c23b777.tar.bz2 rneovim-754822a066e6ce92462aa17fce8999472c23b777.zip |
fix(lua): free vim.ui_attach callback before lua close (#20205)
Diffstat (limited to 'test/functional/lua/ui_event_spec.lua')
-rw-r--r-- | test/functional/lua/ui_event_spec.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/lua/ui_event_spec.lua b/test/functional/lua/ui_event_spec.lua index 294222ad13..57ffcf7b4e 100644 --- a/test/functional/lua/ui_event_spec.lua +++ b/test/functional/lua/ui_event_spec.lua @@ -105,4 +105,16 @@ describe('vim.ui_attach', function() } end) + + it('does not crash on exit', function() + helpers.funcs.system({ + helpers.nvim_prog, + '-u', 'NONE', + '-i', 'NONE', + '--cmd', [[ lua ns = vim.api.nvim_create_namespace 'testspace' ]], + '--cmd', [[ lua vim.ui_attach(ns, {ext_popupmenu=true}, function() end) ]], + '--cmd', 'quitall!', + }) + eq(0, helpers.eval('v:shell_error')) + end) end) |