Skip to content

Commit

Permalink
test: ensure floating windows are not resized
Browse files Browse the repository at this point in the history
  • Loading branch information
willothy authored and cryptomilk committed Oct 13, 2023
1 parent bcb6186 commit 5269ea7
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/test_autoresize.lua
Expand Up @@ -396,4 +396,30 @@ T['autoresize']['does not modify cmdheight'] = function()
eq(child.o.cmdheight, 1)
end

T['autoresize']['does not resize floating windows'] = function()
local win_id = child.api.nvim_open_win(0, false, {
relative = 'editor',
row = 1,
col = 1,
width = 10,
height = 10,
style = 'minimal',
})

child.api.nvim_set_current_win(win_id)

eq(child.api.nvim_win_get_width(win_id), 10)
eq(child.api.nvim_win_get_height(win_id), 10)

child.cmd('FocusAutoresize')

eq(child.api.nvim_win_get_width(win_id), 10)
eq(child.api.nvim_win_get_height(win_id), 10)

child.cmd('FocusMaximise')

eq(child.api.nvim_win_get_width(win_id), 10)
eq(child.api.nvim_win_get_height(win_id), 10)
end

return T

0 comments on commit 5269ea7

Please sign in to comment.