aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/window_spec.lua
diff options
context:
space:
mode:
authornotomo <notomo.motono@gmail.com>2021-08-23 07:27:20 +0900
committerSean Dewar <seandewar@users.noreply.github.com>2021-09-16 14:44:59 +0100
commit6bda2f56eb01b9a9ee3c0d25cb607d03dd64b91a (patch)
treefffb4f1e7afaa43fe0b5d0f46c2507fd8a385958 /test/functional/api/window_spec.lua
parentbe58ba250ee253892ae5c80e89d9a372e89460dc (diff)
downloadrneovim-6bda2f56eb01b9a9ee3c0d25cb607d03dd64b91a.tar.gz
rneovim-6bda2f56eb01b9a9ee3c0d25cb607d03dd64b91a.tar.bz2
rneovim-6bda2f56eb01b9a9ee3c0d25cb607d03dd64b91a.zip
backport: fix(window.c): win_close from other tabpage #15454
Fix #15313
Diffstat (limited to 'test/functional/api/window_spec.lua')
-rw-r--r--test/functional/api/window_spec.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/api/window_spec.lua b/test/functional/api/window_spec.lua
index bb72b63b6c..8c79e6a016 100644
--- a/test/functional/api/window_spec.lua
+++ b/test/functional/api/window_spec.lua
@@ -346,6 +346,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()