aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/window_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/api/window_spec.lua')
-rw-r--r--test/functional/api/window_spec.lua18
1 files changed, 17 insertions, 1 deletions
diff --git a/test/functional/api/window_spec.lua b/test/functional/api/window_spec.lua
index bb72b63b6c..c49d6405f4 100644
--- a/test/functional/api/window_spec.lua
+++ b/test/functional/api/window_spec.lua
@@ -311,7 +311,8 @@ describe('API/win', function()
eq({newwin}, meths.list_wins())
end)
- it('handles changed buffer', function()
+ it("handles changed buffer when 'hidden' is unset", function()
+ command('set nohidden')
local oldwin = meths.get_current_win()
insert('text')
command('new')
@@ -346,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()