From 90b2da16ae1aadc070183a0eeb237dddd0cd21b8 Mon Sep 17 00:00:00 2001 From: notomo Date: Mon, 23 Aug 2021 07:27:20 +0900 Subject: fix(window.c): win_close from other tabpage #15454 Fix #15313 --- test/functional/api/window_spec.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test/functional/api') diff --git a/test/functional/api/window_spec.lua b/test/functional/api/window_spec.lua index e4aa1dae8e..c49d6405f4 100644 --- a/test/functional/api/window_spec.lua +++ b/test/functional/api/window_spec.lua @@ -347,6 +347,21 @@ describe('API/win', function() eq(2, #meths.list_wins()) eq('', funcs.getcmdwintype()) end) + + it('closing current (float) window of another tabpage #15313', function() + command('tabedit') + eq(2, eval('tabpagenr()')) + local win = meths.open_win(0, true, { + relative='editor', row=10, col=10, width=50, height=10 + }) + local tabpage = eval('tabpagenr()') + command('tabprevious') + eq(1, eval('tabpagenr()')) + meths.win_close(win, false) + + eq(1001, meths.tabpage_get_win(tabpage).id) + helpers.assert_alive() + end) end) describe('hide', function() -- cgit