mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
fix(window): respect hide flag of float windows when switching (#30507)
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user