patch 9.1.1425: tabpanel: there are still some problems with the tabpanel

Problem:  tabpanel: there are still some problems with the tabpanel with
          column handling
Solution: fix the problems and refactor Tabpanel feature (Hirohito
          Higashi).

fixes: #17423
fixes: #17332
closes: #17336

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Hirohito Higashi
2025-06-01 20:22:55 +02:00
committed by Christian Brabandt
parent 6c40df09e0
commit 3b9b95dc63
61 changed files with 649 additions and 374 deletions

View File

@ -3630,7 +3630,17 @@ win_new_shellsize(void)
if (old_Columns != Columns)
{
old_Columns = Columns;
shell_new_columns(); // update window sizes
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);
}
}
@ -4454,16 +4464,9 @@ scroll_region_set(win_T *wp, int off)
{
OUT_STR(tgoto((char *)T_CS, W_WINROW(wp) + wp->w_height - 1,
W_WINROW(wp) + off));
#if defined(FEAT_TABPANEL)
if (*T_CSV != NUL)
OUT_STR(tgoto((char *)T_CSV,
wp->w_wincol + wp->w_width - 1 + TPL_LCOL(NULL),
wp->w_wincol + TPL_LCOL(NULL)));
#else
if (*T_CSV != NUL && wp->w_width != Columns)
if (*T_CSV != NUL && wp->w_width != topframe->fr_width)
OUT_STR(tgoto((char *)T_CSV, wp->w_wincol + wp->w_width - 1,
wp->w_wincol));
#endif
screen_start(); // don't know where cursor is now
}
@ -4475,7 +4478,7 @@ scroll_region_reset(void)
{
OUT_STR(tgoto((char *)T_CS, (int)Rows - 1, 0));
if (*T_CSV != NUL)
OUT_STR(tgoto((char *)T_CSV, COLUMNS_WITHOUT_TPL() - 1, 0));
OUT_STR(tgoto((char *)T_CSV, topframe->fr_width - 1, 0));
screen_start(); // don't know where cursor is now
}