mirror of
https://github.com/vim/vim.git
synced 2025-10-15 07:14:09 -04:00
patch 9.1.1839: Window may have wrong height if resized from another tabpage
Problem: Window may have wrong height if resized from another tabpage. Solution: Improve check for whether a tabline has been added (zeertzjq). fixes: #18518 closes: #18519 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
3796c105cf
commit
bd3b958027
@@ -0,0 +1,8 @@
|
|||||||
|
| +2&#ffffff0|2+2#e000e06&| +2#0000000&|[|N|o| |N|a|m|e|]| | +8#0000001#e0e0e08|[|N|o| |N|a|m|e|]| | +1#0000000#ffffff0@49|X+8#0000001#e0e0e08
|
||||||
|
> +0#0000000#ffffff0@19||+1&&| +0&&@53
|
||||||
|
|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @52
|
||||||
|
|~| @18||+1#0000000&|~+0#4040ff13&| @52
|
||||||
|
|~| @18||+1#0000000&|~+0#4040ff13&| @52
|
||||||
|
|~| @18||+1#0000000&|~+0#4040ff13&| @52
|
||||||
|
|<+3#0000000&|N|o| |N|a|m|e|]| |0|,|0|-|1| @1|A|l@1| |[+1&&|N|o| |N|a|m|e|]| @26|0|,|0|-|1| @9|A|l@1
|
||||||
|
| +0&&@74
|
@@ -2307,6 +2307,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
|
||||||
@@ -2351,4 +2352,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
|
||||||
|
@@ -729,6 +729,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1839,
|
||||||
/**/
|
/**/
|
||||||
1838,
|
1838,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -4992,7 +4992,7 @@ leave_tabpage(
|
|||||||
tp->tp_prevwin = prevwin;
|
tp->tp_prevwin = prevwin;
|
||||||
tp->tp_firstwin = firstwin;
|
tp->tp_firstwin = firstwin;
|
||||||
tp->tp_lastwin = lastwin;
|
tp->tp_lastwin = lastwin;
|
||||||
tp->tp_old_Rows = Rows;
|
tp->tp_old_Rows = ROWS_AVAIL;
|
||||||
if (tp->tp_old_Columns != -1)
|
if (tp->tp_old_Columns != -1)
|
||||||
{
|
{
|
||||||
tp->tp_old_Columns = topframe->fr_width;
|
tp->tp_old_Columns = topframe->fr_width;
|
||||||
@@ -5054,7 +5054,7 @@ enter_tabpage(
|
|||||||
// The tabpage line may have appeared or disappeared, may need to resize
|
// The tabpage line may have appeared or disappeared, may need to resize
|
||||||
// the frames for that. When the Vim window was resized need to update
|
// the frames for that. When the Vim window was resized need to update
|
||||||
// frame sizes too.
|
// frame sizes too.
|
||||||
if (curtab->tp_old_Rows != Rows || (old_off != firstwin->w_winrow
|
if (curtab->tp_old_Rows != ROWS_AVAIL || (old_off != firstwin->w_winrow
|
||||||
#ifdef FEAT_GUI_TABLINE
|
#ifdef FEAT_GUI_TABLINE
|
||||||
&& !gui_use_tabline()
|
&& !gui_use_tabline()
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user