aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/vim_spec.lua
diff options
context:
space:
mode:
authorSean Dewar <6256228+seandewar@users.noreply.github.com>2024-03-09 22:32:20 +0000
committerGitHub <noreply@github.com>2024-03-09 22:32:20 +0000
commitb596732831b5e947ce83c1153f0df10a0553c88d (patch)
tree0a6e874de0ba7fb9eb3ef71d89516281731401e7 /test/functional/lua/vim_spec.lua
parentade1b12f49c3b3914c74847d791eb90ea90b56b7 (diff)
parentc3d22d32ee4b4c1911ec15f2a77683d09b09f845 (diff)
downloadrneovim-b596732831b5e947ce83c1153f0df10a0553c88d.tar.gz
rneovim-b596732831b5e947ce83c1153f0df10a0553c88d.tar.bz2
rneovim-b596732831b5e947ce83c1153f0df10a0553c88d.zip
Merge pull request #27330 from seandewar/win_set_config-fixes
fix(api): various window-related function fixes This is a big one!
Diffstat (limited to 'test/functional/lua/vim_spec.lua')
-rw-r--r--test/functional/lua/vim_spec.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua
index a262d239e8..add3df6d8a 100644
--- a/test/functional/lua/vim_spec.lua
+++ b/test/functional/lua/vim_spec.lua
@@ -3664,6 +3664,20 @@ describe('lua stdlib', function()
]]
)
end)
+
+ it('layout in current tabpage does not affect windows in others', function()
+ command('tab split')
+ local t2_move_win = api.nvim_get_current_win()
+ command('vsplit')
+ local t2_other_win = api.nvim_get_current_win()
+ command('tabprevious')
+ matches('E36: Not enough room$', pcall_err(command, 'execute "split|"->repeat(&lines)'))
+ command('vsplit')
+
+ -- Without vim-patch:8.2.3862, this gives E36, despite just the 1st tabpage being full.
+ exec_lua('vim.api.nvim_win_call(..., function() vim.cmd.wincmd "J" end)', t2_move_win)
+ eq({ 'col', { { 'leaf', t2_other_win }, { 'leaf', t2_move_win } } }, fn.winlayout(2))
+ end)
end)
describe('vim.iconv', function()