vim-patch:9.0.0909: error message for layout change does not match action (#37436)

Problem:    Error message for layout change does not match action.
Solution:   Pass the command to where the error is given. (closes vim/vim#11573)

9fda81515b

Thinking about this again, it's actually OK to check split_disallowed in
window_layout_locked(), so add the check.
Also add missing window_layout_locked() in tabpage_close().

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2026-01-17 10:58:26 +08:00
committed by GitHub
parent 8754118213
commit e51f5e17e1
5 changed files with 31 additions and 12 deletions

View File

@@ -1075,7 +1075,8 @@ describe('float window', function()
-- Try switching tab pages and moving windows between tab pages via nvim_win_set_config.
-- Simplest if :fclose skips windows in non-current tabpages.
local w5 = api.nvim_open_win(0, false, { relative = 'editor', row = 0, col = 0, width = 5, height = 5, zindex = 2 })
command('autocmd WinEnter * ++once tabnew')
command('tabnew | tabprevious')
command('autocmd WinEnter * ++once tabnext')
eq(w4, api.nvim_get_current_win())
local tp1 = api.nvim_get_current_tabpage()
command('fclose!')