mirror of
https://github.com/neovim/neovim.git
synced 2026-08-30 02:51:48 +00:00
fix(window): handle closing the only non-float in other tabpage
Problem: No check for closing the only non-floating window in a non-current tabpage that contains floats. This can lead to a tabpage that contains only floats, causing crashes. Solution: Copy the relevant check from win_close to win_close_othertab. Fix some uncovered issues. Closes #34943 Fixes #31236 Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
@@ -142,4 +142,13 @@ describe('tabpage', function()
|
||||
command('tabs')
|
||||
assert_alive()
|
||||
end)
|
||||
|
||||
it('no crash if autocmd remains in tabpage of closing last window', function()
|
||||
exec([[
|
||||
tabnew
|
||||
let s:win = win_getid()
|
||||
autocmd TabLeave * ++once tablast | tabonly
|
||||
quit
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user