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>
--- /dev/null
+| +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
func Test_winfixsize_vsep_statusline()
CheckScreendump
+
let lines =<< trim END
set noequalalways splitbelow splitright
vsplit
call StopVimInTerminal(buf)
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
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1839,
/**/
1838,
/**/
tp->tp_prevwin = prevwin;
tp->tp_firstwin = firstwin;
tp->tp_lastwin = lastwin;
- tp->tp_old_Rows = Rows;
+ tp->tp_old_Rows = ROWS_AVAIL;
if (tp->tp_old_Columns != -1)
{
tp->tp_old_Columns = topframe->fr_width;
// 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
// 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
&& !gui_use_tabline()
#endif