mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 19:25:11 -07:00
fix(lua): free vim.ui_attach callback before lua close (#20205)
This commit is contained in:
parent
0c0071548b
commit
754822a066
@ -821,9 +821,9 @@ void free_all_mem(void)
|
|||||||
|
|
||||||
decor_free_all_mem();
|
decor_free_all_mem();
|
||||||
|
|
||||||
nlua_free_all_mem();
|
|
||||||
ui_free_all_mem();
|
ui_free_all_mem();
|
||||||
ui_comp_free_all_mem();
|
ui_comp_free_all_mem();
|
||||||
|
nlua_free_all_mem();
|
||||||
|
|
||||||
// should be last, in case earlier free functions deallocates arenas
|
// should be last, in case earlier free functions deallocates arenas
|
||||||
arena_free_reuse_blks();
|
arena_free_reuse_blks();
|
||||||
|
@ -105,4 +105,16 @@ describe('vim.ui_attach', function()
|
|||||||
}
|
}
|
||||||
|
|
||||||
end)
|
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)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user