aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/float_spec.lua
diff options
context:
space:
mode:
authorglepnir <glephunter@gmail.com>2024-09-28 06:02:14 +0800
committerGitHub <noreply@github.com>2024-09-28 06:02:14 +0800
commit7b71fdbc1e9fcb71e642e67e0ac9a2711dd67df0 (patch)
tree911bafafb5298e43f30758b515e21ccde466af0e /test/functional/ui/float_spec.lua
parent09d76afe84dd5b895e102dcd8df8ce6271bebfef (diff)
downloadrneovim-7b71fdbc1e9fcb71e642e67e0ac9a2711dd67df0.tar.gz
rneovim-7b71fdbc1e9fcb71e642e67e0ac9a2711dd67df0.tar.bz2
rneovim-7b71fdbc1e9fcb71e642e67e0ac9a2711dd67df0.zip
fix(window): respect hide flag of float windows when switching (#30507)
Diffstat (limited to 'test/functional/ui/float_spec.lua')
-rw-r--r--test/functional/ui/float_spec.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/functional/ui/float_spec.lua b/test/functional/ui/float_spec.lua
index 409cf5aac4..52b46d0ecb 100644
--- a/test/functional/ui/float_spec.lua
+++ b/test/functional/ui/float_spec.lua
@@ -9068,6 +9068,7 @@ describe('float window', function()
end)
it('float window with hide option', function()
+ local cwin = api.nvim_get_current_win()
local buf = api.nvim_create_buf(false,false)
local win = api.nvim_open_win(buf, false, {relative='editor', width=10, height=2, row=2, col=5, hide = true})
local expected_pos = {
@@ -9147,6 +9148,22 @@ describe('float window', function()
|
]])
end
+ -- check window jump with hide
+ feed('<C-W><C-W>')
+ -- should keep on current window
+ eq(cwin, api.nvim_get_current_win())
+ api.nvim_win_set_config(win, {hide=false})
+ api.nvim_set_current_win(win)
+ local win3 = api.nvim_open_win(buf, true, {relative='editor', width=4, height=4, row=2, col=5, hide = false})
+ api.nvim_win_set_config(win, {hide=true})
+ feed('<C-W>w')
+ -- should goto the first window with prev
+ eq(cwin, api.nvim_get_current_win())
+ -- windo
+ command('windo set winheight=6')
+ eq(win3, api.nvim_get_current_win())
+ eq(6, api.nvim_win_get_height(win3))
+ eq(2, api.nvim_win_get_height(win))
end)
it(':fclose command #9663', function()