revert: "fix(window): :close crash with autocmd, floats and tabpage" (#27796)

This reverts PR #27793.

On second thought, this solution may still crash, because it can leave a
window with a NULL buffer if there are autocommand windows or if closing
a floating window fails. It also makes close_last_window_tabpage() more
complicated, so revert it.
This commit is contained in:
zeertzjq
2024-03-10 10:33:10 +08:00
committed by GitHub
parent 9bd4a28079
commit 6052b346f1
2 changed files with 30 additions and 35 deletions

View File

@@ -893,7 +893,7 @@ describe('float window', function()
assert_alive()
end)
it('does not crash if BufUnload makes it the only non-float in tabpage', function()
pending('does not crash if BufUnload makes it the only non-float in tabpage', function()
exec([[
tabnew
let g:buf = bufnr()
@@ -909,10 +909,9 @@ describe('float window', function()
assert_alive()
end)
it('does not crash if WinClosed from floating windows closes it', function()
it('does not crash if WinClosed from floating window closes it', function()
exec([[
tabnew
let g:buf = bufnr()
new
let s:win = win_getid()
call nvim_win_set_config(s:win,