patch 9.1.1391: Vim does not have a vertical tabpanel

Problem:  Vim does not have a tabpanel
Solution: include the tabpanel feature
          (Naruhiko Nishino, thinca)

closes: #17263

Co-authored-by: thinca <thinca@gmail.com>
Signed-off-by: Naruhiko Nishino <naru123456789@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/term.c b/src/term.c
index 03bad0d..2d2c940 100644
--- a/src/term.c
+++ b/src/term.c
@@ -4454,9 +4454,16 @@
 {
     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)
 	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
 }
 
@@ -4468,7 +4475,7 @@
 {
     OUT_STR(tgoto((char *)T_CS, (int)Rows - 1, 0));
     if (*T_CSV != NUL)
-	OUT_STR(tgoto((char *)T_CSV, (int)Columns - 1, 0));
+	OUT_STR(tgoto((char *)T_CSV, COLUMNS_WITHOUT_TPL() - 1, 0));
     screen_start();		    // don't know where cursor is now
 }