mirror of
https://github.com/neovim/neovim.git
synced 2025-10-11 12:26:37 +00:00
vim-patch:9.1.1839: Window may have wrong height if resized from another tabpage (#36093)
Problem: Window may have wrong height if resized from another tabpage. Solution: Improve check for whether a tabline has been added (zeertzjq). fixes: vim/vim#18518 closes: vim/vim#18519bd3b958027
(cherry picked from commit28355050a8
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
f2fb46ef9e
commit
aab8134f87
@@ -407,3 +407,27 @@ it("'winfixwidth/height' does not leave stray vseps/statuslines", function()
|
|||||||
eq(2, fn.winheight(1))
|
eq(2, fn.winheight(1))
|
||||||
eq(4, fn.winheight(2))
|
eq(4, fn.winheight(2))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- oldtest: Test_resize_from_another_tabpage()
|
||||||
|
it('resizing window from another tabpage', function()
|
||||||
|
clear()
|
||||||
|
local screen = Screen.new(75, 8)
|
||||||
|
screen:add_extra_attr_ids({
|
||||||
|
[100] = { foreground = Screen.colors.Magenta1, bold = true },
|
||||||
|
})
|
||||||
|
exec([[
|
||||||
|
set laststatus=2
|
||||||
|
vnew
|
||||||
|
let w = win_getid()
|
||||||
|
tabnew
|
||||||
|
call win_execute(w, 'vertical resize 20')
|
||||||
|
tabprev
|
||||||
|
]])
|
||||||
|
screen:expect([[
|
||||||
|
{5: }{100:2}{5: [No Name] }{24: [No Name] }{2: }{24:X}|
|
||||||
|
^ │ |
|
||||||
|
{1:~ }│{1:~ }|*4
|
||||||
|
{3:[No Name] }{2:[No Name] }|
|
||||||
|
|
|
||||||
|
]])
|
||||||
|
end)
|
||||||
|
@@ -2263,6 +2263,7 @@ endfunc
|
|||||||
|
|
||||||
func Test_winfixsize_vsep_statusline()
|
func Test_winfixsize_vsep_statusline()
|
||||||
CheckScreendump
|
CheckScreendump
|
||||||
|
|
||||||
let lines =<< trim END
|
let lines =<< trim END
|
||||||
set noequalalways splitbelow splitright
|
set noequalalways splitbelow splitright
|
||||||
vsplit
|
vsplit
|
||||||
@@ -2307,4 +2308,22 @@ func Test_winfixsize_vsep_statusline()
|
|||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_resize_from_another_tabpage()
|
||||||
|
CheckScreendump
|
||||||
|
|
||||||
|
let lines =<< trim END
|
||||||
|
set laststatus=2
|
||||||
|
vnew
|
||||||
|
let w = win_getid()
|
||||||
|
tabnew
|
||||||
|
call win_execute(w, 'vertical resize 20')
|
||||||
|
tabprev
|
||||||
|
END
|
||||||
|
call writefile(lines, 'XTestResizeFromAnotherTabpage', 'D')
|
||||||
|
let buf = RunVimInTerminal('-S XTestResizeFromAnotherTabpage', #{rows: 8})
|
||||||
|
call VerifyScreenDump(buf, 'Test_resize_from_another_tabpage_1', {})
|
||||||
|
|
||||||
|
call StopVimInTerminal(buf)
|
||||||
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
Reference in New Issue
Block a user