From 6052b346f1b7a3fb616dfcefe3bc05cb6fe3f2f3 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 10 Mar 2024 10:33:10 +0800 Subject: 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. --- test/functional/ui/float_spec.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/functional/ui/float_spec.lua b/test/functional/ui/float_spec.lua index 6bc3fd14ec..65a7d359af 100644 --- a/test/functional/ui/float_spec.lua +++ b/test/functional/ui/float_spec.lua @@ -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, -- cgit