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:
zeertzjq
2025-10-08 16:26:04 +00:00
committed by Christian Brabandt
parent 3796c105cf
commit bd3b958027
4 changed files with 31 additions and 2 deletions

View File

@ -4992,7 +4992,7 @@ leave_tabpage(
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;
@ -5054,7 +5054,7 @@ enter_tabpage(
// 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