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>
diff --git a/src/drawline.c b/src/drawline.c
index 3be9a3a..84a1d89 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -875,7 +875,7 @@
}
}
- screen_line(wp, wlv->screen_row, wp->w_wincol + TPL_LCOL(wp), wlv->col,
+ screen_line(wp, wlv->screen_row, wp->w_wincol, wlv->col,
clear_end ? wp->w_width : -wp->w_width,
wlv->vcol - 1, wlv->screen_line_flags);
}
@@ -4355,7 +4355,7 @@
#ifdef FEAT_PROP_POPUP
&& !text_prop_above && !text_prop_follows
#endif
- && wp->w_width == COLUMNS_WITHOUT_TPL())
+ && wp->w_width == Columns)
{
// Remember that the line wraps, used for modeless copy.
LineWraps[wlv.screen_row - 1] = TRUE;
@@ -4380,7 +4380,7 @@
== 2
|| (*mb_off2cells)(
LineOffset[wlv.screen_row - 1]
- + (int)COLUMNS_WITHOUT_TPL() - 2,
+ + (int)topframe->fr_width - 2,
LineOffset[wlv.screen_row]
+ screen_Columns) == 2)))
{
@@ -4390,17 +4390,17 @@
// auto-wrap, we overwrite the character.
if (screen_cur_col != wp->w_width)
screen_char(LineOffset[wlv.screen_row - 1]
- + (unsigned)COLUMNS_WITHOUT_TPL() - 1,
- wlv.screen_row - 1, (int)(COLUMNS_WITHOUT_TPL() - 1));
+ + (unsigned)topframe->fr_width - 1,
+ wlv.screen_row - 1, (int)(topframe->fr_width - 1));
// When there is a multi-byte character, just output a
// space to keep it simple.
if (has_mbyte && MB_BYTE2LEN(ScreenLines[LineOffset[
- wlv.screen_row - 1] + (COLUMNS_WITHOUT_TPL() - 1)]) > 1)
+ wlv.screen_row - 1] + (topframe->fr_width - 1)]) > 1)
out_char(' ');
else
out_char(ScreenLines[LineOffset[wlv.screen_row - 1]
- + (COLUMNS_WITHOUT_TPL() - 1)]);
+ + (topframe->fr_width - 1)]);
// force a redraw of the first char on the next line
ScreenAttrs[LineOffset[wlv.screen_row]] = (sattr_T)-1;
screen_start(); // don't know where cursor is now