fix(window): avoid referencing cmdline_win after it is closed #35617

Solution:  A window marked for ext_cmdline usage is still referenced
           after it is already closed and freed.
Solution:  Unset cmdline_win when the window is closed.
This commit is contained in:
luukvbaal
2025-09-04 01:28:23 +02:00
committed by GitHub
parent 17da1ad8f4
commit de950f8272
2 changed files with 11 additions and 0 deletions

View File

@@ -390,6 +390,13 @@ describe('vim.ui_attach', function()
9 bufname( {12: } |
Excommand:call bufadd^( |
]])
-- No crash after _cmdline_offset window is closed #35584.
exec_lua(function()
vim.ui_detach(_G.ns)
vim.api.nvim_win_close(_G.win, true)
end)
feed('<Esc>:<Tab>')
n.assert_alive()
end)
end)