mirror of
https://github.com/neovim/neovim.git
synced 2025-12-09 16:12:48 +00:00
vim-patch:9.1.0118: Use different restoration strategy in win_splitmove
Problem: saving and restoring all frames to split-move is overkill now
that WinNewPre is not fired when split-moving.
Solution: defer the flattening of frames until win_split_ins begins
reorganising them, and attempt to restore the layout by
undoing our changes. (Sean Dewar)
704966c254
Adjust winframe_restore to account for Nvim's horizontal separators when the
global statusline is in use. Add a test.
This commit is contained in:
@@ -11,6 +11,7 @@ local exec = helpers.exec
|
||||
local exec_lua = helpers.exec_lua
|
||||
local eval = helpers.eval
|
||||
local sleep = vim.uv.sleep
|
||||
local pcall_err = helpers.pcall_err
|
||||
|
||||
local mousemodels = { 'extend', 'popup', 'popup_setpos' }
|
||||
|
||||
@@ -474,6 +475,25 @@ describe('global statusline', function()
|
||||
|
|
||||
]])
|
||||
end)
|
||||
|
||||
it('horizontal separators unchanged when failing to split-move window', function()
|
||||
exec([[
|
||||
botright split
|
||||
let &winwidth = &columns
|
||||
let &winminwidth = &columns
|
||||
]])
|
||||
eq('Vim(wincmd):E36: Not enough room', pcall_err(command, 'wincmd L'))
|
||||
command('mode')
|
||||
screen:expect([[
|
||||
|
|
||||
{1:~ }|*5
|
||||
────────────────────────────────────────────────────────────|
|
||||
^ |
|
||||
{1:~ }|*6
|
||||
{2:[No Name] 0,0-1 All}|
|
||||
|
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
|
||||
it('statusline does not crash if it has Arabic characters #19447', function()
|
||||
|
||||
Reference in New Issue
Block a user