patch 9.1.1458: tabpanel: tabs not properly updated with 'stpl'
Problem: tabpanel: tabs not properly updated with 'stpl'
Solution: remember the Column offset per tabpage
(Hirohito Higashi)
fixes: #17519
closes: #17544
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/term.c b/src/term.c
index 6f7983b..c7ac8ab 100644
--- a/src/term.c
+++ b/src/term.c
@@ -3614,8 +3614,10 @@
{
static int old_Rows = 0;
static int old_Columns = 0;
+ static int old_coloff = 0;
- if (old_Rows != Rows || old_Columns != Columns)
+ if (old_Rows != Rows || old_Columns != COLUMNS_WITHOUT_TPL()
+ || old_coloff != TPL_LCOL(NULL))
ui_new_shellsize();
if (old_Rows != Rows)
{
@@ -3627,20 +3629,12 @@
old_Rows = Rows;
shell_new_rows(); // update window sizes
}
- if (old_Columns != Columns)
+ if (old_Columns != COLUMNS_WITHOUT_TPL() || old_coloff != TPL_LCOL(NULL))
{
- old_Columns = Columns;
+ old_Columns = COLUMNS_WITHOUT_TPL();
+ old_coloff = TPL_LCOL(NULL);
- tabpage_T *save_curtab = curtab;
- tabpage_T *tp;
- FOR_ALL_TABPAGES(tp)
- {
- unuse_tabpage(curtab);
- use_tabpage(tp);
- shell_new_columns();
- }
- unuse_tabpage(curtab);
- use_tabpage(save_curtab);
+ shell_new_columns();
}
}