mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 07:48:18 +00:00
fix(decorations): crash when :bdelete (extmark_free_all) after clear_namespace
fixes #15212
This commit is contained in:
@@ -697,4 +697,50 @@ end]]
|
||||
|
|
||||
]]}
|
||||
end)
|
||||
it('does not crash when deleting a cleared buffer #15212', function()
|
||||
exec_lua [[
|
||||
ns = vim.api.nvim_create_namespace("myplugin")
|
||||
vim.api.nvim_buf_set_extmark(0, ns, 0, 0, {virt_text = {{"a"}}, end_col = 0})
|
||||
]]
|
||||
screen:expect{grid=[[
|
||||
^ a |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
|
|
||||
]]}
|
||||
|
||||
exec_lua [[
|
||||
vim.api.nvim_buf_clear_namespace(0, ns, 0, -1)
|
||||
vim.cmd("bdelete")
|
||||
]]
|
||||
screen:expect{grid=[[
|
||||
^ |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
|
|
||||
]]}
|
||||
helpers.assert_alive()
|
||||
end)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user