patch 9.1.1898: tabpanel: inconsistent use of cmdline with tabpanel

Commit: 
https://github.com/vim/vim/commit/cf4d9625c6eb21107e030dc879c1390596fbdb8d
Author: Hirohito Higashi <[email protected]>
Date:   Thu Nov 6 20:23:36 2025 +0000

    patch 9.1.1898: tabpanel: inconsistent use of cmdline with tabpanel
    
    Problem:  tabpanel: inconsistent use of cmdline and message area with
              tabpanel
    Solution: Reduce the cmdline and message area by the horizontal size of
              the tabpanel (Hirohito Higashi)
    
    closes: #18678
    
    Signed-off-by: Hirohito Higashi <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/arglist.c b/src/arglist.c
index 398e23a27..657e2790a 100644
--- a/src/arglist.c
+++ b/src/arglist.c
@@ -1007,7 +1007,7 @@ arg_all_close_unused_windows(arg_all_state_T *aall)
            buf = wp->w_buffer;
            if (buf->b_ffname == NULL
                    || (!aall->keep_tabs && (buf->b_nwindows > 1
-                           || wp->w_width != Columns)))
+                           || wp->w_width != cmdline_width)))
                i = aall->opened_len;
            else
            {
diff --git a/src/cmdexpand.c b/src/cmdexpand.c
index 104fe08ae..5cdc55b31 100644
--- a/src/cmdexpand.c
+++ b/src/cmdexpand.c
@@ -421,7 +421,7 @@ cmdline_pum_create(
     if (showtail)
        prefix_len += vim_strsize(showmatches_gettail(matches[0]))
            - vim_strsize(matches[0]);
-    compl_startcol = MAX(0, compl_startcol - prefix_len);
+    compl_startcol = cmdline_col_off + MAX(0, compl_startcol - prefix_len);
 
     return EXPAND_OK;
 }
@@ -611,9 +611,9 @@ win_redr_status_matches(
        return;
 
     if (has_mbyte)
-       buf = alloc(Columns * MB_MAXBYTES + 1);
+       buf = alloc(topframe->fr_width * MB_MAXBYTES + 1);
     else
-       buf = alloc(Columns + 1);
+       buf = alloc(topframe->fr_width + 1);
     if (buf == NULL)
        return;
 
@@ -640,7 +640,7 @@ win_redr_status_matches(
        if (first_match > 0)
            clen += 2;
        // jumping right, put match at the left
-       if ((long)clen > Columns)
+       if (clen > topframe->fr_width)
        {
            first_match = match;
            // if showing the last match, we can add some on the left
@@ -648,7 +648,7 @@ win_redr_status_matches(
            for (i = match; i < num_matches; ++i)
            {
                clen += status_match_len(xp, SHOW_MATCH(i)) + 2;
-               if ((long)clen >= Columns)
+               if (clen >= topframe->fr_width)
                    break;
            }
            if (i == num_matches)
@@ -659,7 +659,7 @@ win_redr_status_matches(
        while (first_match > 0)
        {
            clen += status_match_len(xp, SHOW_MATCH(first_match - 1)) + 2;
-           if ((long)clen >= Columns)
+           if (clen >= topframe->fr_width)
                break;
            --first_match;
        }
@@ -679,7 +679,7 @@ win_redr_status_matches(
     clen = len;
 
     i = first_match;
-    while ((long)(clen + status_match_len(xp, SHOW_MATCH(i)) + 2) < Columns)
+    while (clen + status_match_len(xp, SHOW_MATCH(i)) + 2 < topframe->fr_width)
     {
        if (i == match)
        {
@@ -773,14 +773,17 @@ win_redr_status_matches(
            }
        }
 
-       screen_puts(buf, row, 0, attr);
+       screen_puts(buf, row, firstwin->w_wincol, attr);
        if (selstart != NULL && highlight)
        {
            *selend = NUL;
-           screen_puts(selstart, row, selstart_col, HL_ATTR(HLF_WM));
+           screen_puts(selstart, row, firstwin->w_wincol + selstart_col,
+                   HL_ATTR(HLF_WM));
        }
 
-       screen_fill(row, row + 1, clen, (int)Columns, fillchar, fillchar, attr);
+       screen_fill(row, row + 1, firstwin->w_wincol + clen,
+               firstwin->w_wincol + topframe->fr_width,
+               fillchar, fillchar, attr);
     }
 
     win_redraw_last_status(topframe);
@@ -1371,7 +1374,7 @@ showmatches(expand_T *xp, int display_wildmenu, int 
display_list, int noselect)
        {
            // compute the number of columns and lines for the listing
            maxlen += 2;    // two spaces between file names
-           columns = ((int)Columns + 2) / maxlen;
+           columns = (cmdline_width + 2) / maxlen;
            if (columns < 1)
                columns = 1;
            lines = (numMatches + columns - 1) / columns;
@@ -4503,9 +4506,6 @@ wildmenu_cleanup(cmdline_info_T *cclp UNUSED)
        p_ls = save_p_ls;
        p_wmh = save_p_wmh;
        last_status(FALSE);
-#if defined(FEAT_TABPANEL)
-       redraw_tabpanel = TRUE;
-#endif
        update_screen(UPD_VALID);       // redraw the screen NOW
        redrawcmd();
        save_p_ls = -1;
diff --git a/src/digraph.c b/src/digraph.c
index 262353c01..481cc4a3c 100644
--- a/src/digraph.c
+++ b/src/digraph.c
@@ -1972,7 +1972,7 @@ printdigraph(digr_T *dp, result_T *previous)
        *previous = dp->result;
     }
 #endif
-    if (msg_col > Columns - list_width)
+    if (msg_col > cmdline_width - list_width)
        msg_putchar('
');
     if (msg_col)
        while (msg_col % list_width != 0)
diff --git a/src/drawscreen.c b/src/drawscreen.c
index 7d3b3bd6a..46832302c 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -502,7 +502,7 @@ win_redr_status(win_T *wp, int ignore_pum UNUSED)
        if (wp->w_buffer->b_p_ro)
            plen += vim_snprintf((char *)p + plen, MAXPATHL - plen, "%s", 
_("[RO]"));
 
-       this_ru_col = ru_col - (Columns - wp->w_width);
+       this_ru_col = ru_col - (cmdline_width - wp->w_width);
        n = (wp->w_width + 1) / 2;
        if (this_ru_col < n)
            this_ru_col = n;
@@ -721,8 +721,8 @@ win_redr_ruler(win_T *wp, int always, int ignore_pum)
            row = Rows - 1;
            fillchar = ' ';
            attr = 0;
-           width = Columns;
-           off = 0;
+           off = cmdline_col_off;
+           width = cmdline_width;
        }
 
        // In list mode virtcol needs to be recomputed
@@ -755,7 +755,7 @@ win_redr_ruler(win_T *wp, int always, int ignore_pum)
        if (wp->w_status_height == 0)   // can't use last char of screen
            ++n1;
 
-       this_ru_col = ru_col - (Columns - width);
+       this_ru_col = ru_col - (cmdline_width - width);
        // Never use more than half the window/screen width, leave the other
        // half for the filename.
        n2 = (width + 1) / 2;
@@ -2609,7 +2609,7 @@ win_update(win_T *wp)
                            FALSE);
            else
                screen_char(LineOffset[k] + topframe->fr_width - 1, k,
-                       Columns - 1);
+                       cmdline_width - 1);
     }
 #endif
 
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index bb58e47f0..8e861d5a2 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -1253,7 +1253,7 @@ do_bang(
        msg_putchar('!');
        msg_outtrans(newcmd);
        msg_clr_eos();
-       windgoto(msg_row, msg_col);
+       windgoto(msg_row, cmdline_col_off + msg_col);
 
        do_shell(newcmd, 0);
     }
@@ -1404,7 +1404,7 @@ do_filter(
     if (cmd_buf == NULL)
        goto filterend;
 
-    windgoto((int)Rows - 1, 0);
+    windgoto((int)Rows - 1, cmdline_col_off);
     cursor_on();
 
     /*
@@ -1659,7 +1659,7 @@ do_shell(
     // This windgoto is required for when the '
' resulted in a "delete line
     // 1" command to the terminal.
     if (!swapping_screen())
-       windgoto(msg_row, msg_col);
+       windgoto(msg_row, cmdline_col_off + msg_col);
     cursor_on();
     (void)call_shell(cmd, SHELL_COOKED | flags);
     did_check_timestamps = FALSE;
@@ -4694,7 +4694,7 @@ ex_substitute(exarg_T *eap)
                            msg_no_more = FALSE;
                            msg_scroll = i;
                            showruler(TRUE);
-                           windgoto(msg_row, msg_col);
+                           windgoto(msg_row, cmdline_col_off + msg_col);
                            RedrawingDisabled = save_RedrawingDisabled;
 
 #ifdef USE_ON_FLY_SCROLL
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 91a03b9d8..3f31460a0 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -6684,7 +6684,7 @@ ex_stop(exarg_T *eap)
     if (!eap->forceit)
        autowrite_all();
     apply_autocmds(EVENT_VIMSUSPEND, NULL, NULL, FALSE, NULL);
-    windgoto((int)Rows - 1, 0);
+    windgoto((int)Rows - 1, cmdline_col_off);
     out_char('
');
     out_flush();
     stoptermcap();
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 5fc9330bc..63e981454 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -1167,7 +1167,7 @@ cmdline_erase_chars(
        {
 #ifdef FEAT_RIGHTLEFT
            if (cmdmsg_rl)
-               msg_col = Columns;
+               msg_col = cmdline_width;
            else
 #endif
                msg_col = 0;
@@ -1375,8 +1375,8 @@ cmdline_left_right_mouse(int c, int *ignore_drag_release)
        int     i;
 
        i = cmdline_charsize(ccline.cmdpos);
-       if (mouse_row <= cmdline_row + ccline.cmdspos / Columns
-               && mouse_col < ccline.cmdspos % Columns + i)
+       if (mouse_row <= cmdline_row + ccline.cmdspos / cmdline_width
+               && mouse_col < ccline.cmdspos % cmdline_width + i)
            break;
        if (has_mbyte)
        {
@@ -2114,7 +2114,7 @@ getcmdline_int(
                    goto cmdline_changed;
                if (!cmd_silent)
                {
-                   windgoto(msg_row, 0);
+                   windgoto(msg_row, cmdline_col_off);
                    out_flush();
                }
                break;
@@ -2285,7 +2285,7 @@ getcmdline_int(
                    if (ccline.cmdpos >= ccline.cmdlen)
                        break;
                    i = cmdline_charsize(ccline.cmdpos);
-                   if (KeyTyped && ccline.cmdspos + i >= Columns * Rows)
+                   if (KeyTyped && ccline.cmdspos + i >= cmdline_width * Rows)
                        break;
                    ccline.cmdspos += i;
                    if (has_mbyte)
@@ -3010,8 +3010,8 @@ set_cmdspos_cursor(void)
     set_cmdspos();
     if (KeyTyped)
     {
-       m = Columns * Rows;
-       if (m < 0)      // overflow, Columns or Rows at weird value
+       m = cmdline_width * Rows;
+       if (m < 0)      // overflow, cmdline_width or Rows at weird value
            m = MAXCOL;
     }
     else
@@ -3043,7 +3043,7 @@ correct_cmdspos(int idx, int cells)
 {
     if ((*mb_ptr2len)(ccline.cmdbuff + idx) > 1
                && (*mb_ptr2cells)(ccline.cmdbuff + idx) > 1
-               && ccline.cmdspos % Columns + cells > Columns)
+               && ccline.cmdspos % cmdline_width + cells > cmdline_width)
        ccline.cmdspos++;
 }
 
@@ -3243,7 +3243,7 @@ redraw:
                    }
                }
                msg_clr_eos();
-               windgoto(msg_row, msg_col);
+               windgoto(msg_row, cmdline_col_off + msg_col);
                continue;
            }
 
@@ -3316,7 +3316,7 @@ redraw:
        line_ga.ga_len += len;
        escaped = FALSE;
 
-       windgoto(msg_row, msg_col);
+       windgoto(msg_row, cmdline_col_off + msg_col);
        pend = (char_u *)(line_ga.ga_data) + line_ga.ga_len;
 
        // We are done when a NL is entered, but not when it comes after a
@@ -3432,8 +3432,8 @@ redrawcmd_preedit(void)
            cmdpos  += preedit_start_col;
        }
 
-       msg_row = cmdline_row + (cmdspos / (int)Columns);
-       msg_col = cmdspos % (int)Columns;
+       msg_row = cmdline_row + (cmdspos / cmdline_width);
+       msg_col = cmdspos % cmdline_width;
        if (msg_row >= Rows)
            msg_row = Rows - 1;
 
@@ -3808,7 +3808,7 @@ put_on_cmdline(char_u *str, int len, int redraw)
                msg_col -= i;
                if (msg_col < 0)
                {
-                   msg_col += Columns;
+                   msg_col += cmdline_width;
                    --msg_row;
                }
            }
@@ -3827,8 +3827,8 @@ put_on_cmdline(char_u *str, int len, int redraw)
        }
        if (KeyTyped)
        {
-           m = Columns * Rows;
-           if (m < 0)  // overflow, Columns or Rows at weird value
+           m = cmdline_width * Rows;
+           if (m < 0)  // overflow, cmdline_width or Rows at weird value
                m = MAXCOL;
        }
        else
@@ -4052,7 +4052,7 @@ redrawcmdprompt(void)
     if (ccline.cmdprompt != NULL)
     {
        msg_puts_attr((char *)ccline.cmdprompt, ccline.cmdattr);
-       ccline.cmdindent = msg_col + (msg_row - cmdline_row) * Columns;
+       ccline.cmdindent = msg_col + (msg_row - cmdline_row) * cmdline_width;
        // do the reverse of set_cmdspos()
        if (ccline.cmdfirstc != NUL)
            --ccline.cmdindent;
@@ -4076,7 +4076,7 @@ redrawcmd(void)
     // when 'incsearch' is set there may be no command line while redrawing
     if (ccline.cmdbuff == NULL)
     {
-       windgoto(cmdline_row, 0);
+       windgoto(cmdline_row, cmdline_col_off);
        msg_clr_eos();
        return;
     }
@@ -4131,21 +4131,21 @@ cursorcmd(void)
 #ifdef FEAT_RIGHTLEFT
     if (cmdmsg_rl)
     {
-       msg_row = cmdline_row  + (ccline.cmdspos / (int)(Columns - 1));
-       msg_col = (int)Columns - (ccline.cmdspos % (int)(Columns - 1)) - 1;
+       msg_row = cmdline_row  + (ccline.cmdspos / (cmdline_width - 1));
+       msg_col = cmdline_width - (ccline.cmdspos % (cmdline_width - 1)) - 1;
        if (msg_row <= 0)
            msg_row = Rows - 1;
     }
     else
 #endif
     {
-       msg_row = cmdline_row + (ccline.cmdspos / (int)Columns);
-       msg_col = ccline.cmdspos % (int)Columns;
+       msg_row = cmdline_row + (ccline.cmdspos / cmdline_width);
+       msg_col = ccline.cmdspos % cmdline_width;
        if (msg_row >= Rows)
            msg_row = Rows - 1;
     }
 
-    windgoto(msg_row, msg_col);
+    windgoto(msg_row, cmdline_col_off + msg_col);
 #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
     if (p_imst == IM_ON_THE_SPOT)
        redrawcmd_preedit();
@@ -4161,13 +4161,13 @@ gotocmdline(int clr)
     msg_start();
 #ifdef FEAT_RIGHTLEFT
     if (cmdmsg_rl)
-       msg_col = Columns - 1;
+       msg_col = cmdline_width - 1;
     else
 #endif
        msg_col = 0;        // always start in column 0
     if (clr)               // clear the bottom line(s)
        msg_clr_eos();      // will reset clear_cmdline
-    windgoto(cmdline_row, 0);
+    windgoto(cmdline_row, cmdline_col_off);
 }
 
 /*
diff --git a/src/getchar.c b/src/getchar.c
index d4f4cf426..3219fd2ce 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -2448,7 +2448,7 @@ getchar_common(typval_T *argvars, typval_T *rettv, int 
allow_number)
     if (cursor_flag == 'h')
        cursor_sleep();
     else if (cursor_flag == 'm')
-       windgoto(msg_row, msg_col);
+       windgoto(msg_row, cmdline_col_off + msg_col);
 
     ++no_mapping;
     ++allow_keys;
diff --git a/src/globals.h b/src/globals.h
index 6eba836d4..bd2b5f91a 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -146,6 +146,8 @@ EXTERN int  vgetc_char INIT(= 0);
  * update_screen().
  */
 EXTERN int     cmdline_row;
+EXTERN int     cmdline_col_off;
+EXTERN int     cmdline_width;
 
 EXTERN int     redraw_cmdline INIT(= FALSE);   // cmdline must be redrawn
 EXTERN int     redraw_mode INIT(= FALSE);      // mode must be redrawn
diff --git a/src/highlight.c b/src/highlight.c
index c70c429e1..f8d368836 100644
--- a/src/highlight.c
+++ b/src/highlight.c
@@ -3447,7 +3447,7 @@ syn_list_header(
        name_col = msg_col;
        endcol = 15;
     }
-    else if (msg_col + outlen + 1 >= Columns)
+    else if (msg_col + outlen + 1 >= cmdline_width)
     {
        msg_putchar('
');
        if (got_int)
@@ -3461,15 +3461,15 @@ syn_list_header(
 
     if (msg_col >= endcol)     // output at least one space
        endcol = msg_col + 1;
-    if (Columns <= (long)endcol)       // avoid hang for tiny window
-       endcol = (int)(Columns - 1);
+    if (cmdline_width <= endcol)       // avoid hang for tiny window
+       endcol = cmdline_width - 1;
 
     msg_advance(endcol);
 
     // Show "xxx" with the attributes.
     if (!did_header)
     {
-       if (endcol == Columns - 1 && endcol <= name_col)
+       if (endcol == cmdline_width - 1 && endcol <= name_col)
            msg_putchar(' ');
        msg_puts_attr("xxx", syn_id2attr(id));
        msg_putchar(' ');
diff --git a/src/if_cscope.c b/src/if_cscope.c
index de27d7ef6..7d246b58b 100644
--- a/src/if_cscope.c
+++ b/src/if_cscope.c
@@ -2084,7 +2084,7 @@ cs_print_tags_priv(char **matches, char **cntxts, int 
num_matches)
            (void)sprintf(buf, cntxformat, context);
 
            // print the context only if it fits on the same line
-           if (msg_col + (int)strlen(buf) >= (int)Columns)
+           if (msg_col + (int)strlen(buf) >= cmdline_width)
                msg_putchar('
');
            msg_advance(12);
            msg_outtrans_long_attr((char_u *)buf, 0);
diff --git a/src/main.c b/src/main.c
index ba5b5b7d8..14ae3eaf3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -398,7 +398,10 @@ main
 #endif
 
     cmdline_row = Rows - p_ch;
+    cmdline_col_off = 0;
+    cmdline_width = (int)Columns;
     msg_row = cmdline_row;
+    msg_col = 0;
     screenalloc(FALSE);                // allocate screen buffers
     set_init_2();
     TIME_MSG("inits 2");
diff --git a/src/message.c b/src/message.c
index d4ebc8e68..a6dd888b9 100644
--- a/src/message.c
+++ b/src/message.c
@@ -194,7 +194,7 @@ msg_attr_keep(
     retval = msg_end();
 
     if (keep && retval && vim_strsize((char_u *)s)
-                           < (int)(Rows - cmdline_row - 1) * Columns + sc_col)
+                   < (int)(Rows - cmdline_row - 1) * cmdline_width + sc_col)
        set_keep_msg((char_u *)s, 0);
 
     need_fileinfo = FALSE;
@@ -228,10 +228,10 @@ msg_strtrunc(
 #endif
                )
            // Use all the columns.
-           room = (int)(Rows - msg_row) * Columns - 1;
+           room = (int)(Rows - msg_row) * cmdline_width - 1;
        else
            // Use up to 'showcmd' column.
-           room = (int)(Rows - msg_row - 1) * Columns + sc_col - 1;
+           room = (int)(Rows - msg_row - 1) * cmdline_width + sc_col - 1;
        if (len > room && room > 0)
        {
            if (enc_utf8)
@@ -989,7 +989,7 @@ msg_may_trunc(int force, char_u *s)
 
     // If 'cmdheight' is zero or something unexpected happened "room" may be
     // negative.
-    room = (int)(Rows - cmdline_row - 1) * Columns + sc_col - 1;
+    room = (int)(Rows - cmdline_row - 1) * cmdline_width + sc_col - 1;
     if (room > 0 && (force || (shortmess(SHM_TRUNC) && !exmode_active))
            && (n = (int)STRLEN(s) - room) > 0)
     {
@@ -1368,7 +1368,7 @@ wait_return(int redraw)
                            c = K_IGNORE;
                            msg_col =
 #ifdef FEAT_RIGHTLEFT
-                               cmdmsg_rl ? Columns - 1 :
+                               cmdmsg_rl ? cmdline_width - 1 :
 #endif
                                0;
                        }
@@ -1472,7 +1472,7 @@ wait_return(int redraw)
     lines_left = -1;           // reset lines_left at next msg_start()
     reset_last_sourcing();
     if (keep_msg != NULL && vim_strsize(keep_msg) >=
-                                 (Rows - cmdline_row - 1) * Columns + sc_col)
+                           (Rows - cmdline_row - 1) * cmdline_width + sc_col)
        VIM_CLEAR(keep_msg);        // don't redisplay message, it's too long
 
     if (tmpState == MODE_SETWSIZE)  // got resize event while in vgetc()
@@ -1586,7 +1586,7 @@ msg_start(void)
        msg_row = cmdline_row;
        msg_col =
 #ifdef FEAT_RIGHTLEFT
-           cmdmsg_rl ? Columns - 1 :
+           cmdmsg_rl ? cmdline_width - 1 :
 #endif
            0;
     }
@@ -2228,21 +2228,21 @@ screen_puts_mbyte(char_u *s, int l, int attr)
 #ifdef FEAT_RIGHTLEFT
                cmdmsg_rl ? msg_col <= 1 :
 #endif
-               msg_col == Columns - 1))
+               msg_col == cmdline_width - 1))
     {
        // Doesn't fit, print a highlighted '>' to fill it up.
        msg_screen_putchar('>', HL_ATTR(HLF_AT));
        return s;
     }
 
-    screen_puts_len(s, l, msg_row, msg_col, attr);
+    screen_puts_len(s, l, msg_row, cmdline_col_off + msg_col, attr);
 #ifdef FEAT_RIGHTLEFT
     if (cmdmsg_rl)
     {
        msg_col -= cw;
        if (msg_col == 0)
        {
-           msg_col = Columns;
+           msg_col = cmdline_width;
            ++msg_row;
        }
     }
@@ -2250,7 +2250,7 @@ screen_puts_mbyte(char_u *s, int l, int attr)
 #endif
     {
        msg_col += cw;
-       if (msg_col >= Columns)
+       if (msg_col >= cmdline_width)
        {
            msg_col = 0;
            ++msg_row;
@@ -2286,7 +2286,7 @@ msg_outtrans_long_len_attr(char_u *longstr, int len, int 
attr)
     int                slen = len;
     int                room;
 
-    room = Columns - msg_col;
+    room = cmdline_width - msg_col;
     if (len > room && room >= 20)
     {
        slen = (room - 3) / 2;
@@ -2497,10 +2497,11 @@ msg_puts_display(
                      || (has_mbyte && (*mb_ptr2cells)(s) > 1 && msg_col <= 2))
                    :
 #endif
-                     ((*s != '
' && msg_col + t_col >= Columns - 1)
-                      || (*s == TAB && msg_col + t_col >= ((Columns - 1) & ~7))
+                     ((*s != '
' && msg_col + t_col >= cmdline_width - 1)
+                      || (*s == TAB && msg_col + t_col
+                          >= ((cmdline_width - 1) & ~7))
                       || (has_mbyte && (*mb_ptr2cells)(s) > 1
-                                        && msg_col + t_col >= Columns - 2)))))
+                          && msg_col + t_col >= cmdline_width - 2)))))
        {
            /*
             * The screen is scrolled up when at the last row (some terminals
@@ -2533,8 +2534,8 @@ msg_puts_display(
                msg_scroll_up();
 
            msg_row = Rows - 2;
-           if (msg_col >= Columns)     // can happen after screen resize
-               msg_col = Columns - 1;
+           if (msg_col >= cmdline_width)   // can happen after screen resize
+               msg_col = cmdline_width - 1;
 
            // Display char in last column before showing more-prompt.
            if (*s >= ' '
@@ -2602,9 +2603,9 @@ msg_puts_display(
        }
 
        wrap = *s == '
'
-                   || msg_col + t_col >= Columns
+                   || msg_col + t_col >= cmdline_width
                    || (has_mbyte && (*mb_ptr2cells)(s) > 1
-                                           && msg_col + t_col >= Columns - 1);
+                           && msg_col + t_col >= cmdline_width - 1);
        if (t_col > 0 && (wrap || *s == '
' || *s == ' '
                                                 || *s == '     ' || *s == 
BELL))
        {
@@ -2643,7 +2644,7 @@ msg_puts_display(
                msg_didout = FALSE;         // remember that line is empty
 #ifdef FEAT_RIGHTLEFT
            if (cmdmsg_rl)
-               msg_col = Columns - 1;
+               msg_col = cmdline_width - 1;
            else
 #endif
                msg_col = 0;
@@ -2699,7 +2700,7 @@ msg_puts_display(
 # ifdef FEAT_RIGHTLEFT
                    cmdmsg_rl ||
 # endif
-                   (cw > 1 && msg_col + t_col >= Columns - 1))
+                   (cw > 1 && msg_col + t_col >= cmdline_width - 1))
            {
                if (l > 1)
                    s = screen_puts_mbyte(s, l, attr) - 1;
@@ -2781,8 +2782,8 @@ msg_scroll_up(void)
        // Scrolling up doesn't result in the right background.  Set the
        // background here.  It's not efficient, but avoids that we have to do
        // it all over the code.
-       screen_fill((int)Rows - 1, (int)Rows, 0, (int)Columns,
-               ' ', ' ', HL_ATTR(HLF_MSG));
+       screen_fill((int)Rows - 1, (int)Rows, cmdline_col_off,
+               cmdline_col_off + cmdline_width, ' ', ' ', HL_ATTR(HLF_MSG));
 
        // Also clear the last char of the last but one line if it was not
        // cleared before to avoid a scroll-up.
@@ -3068,7 +3069,8 @@ disp_sb_line(int row, msgchunk_T *smp, int clear_to_eol)
        // If clearing the screen did not work (e.g. because of a background
        // color and t_ut isn't set) clear until the last column here.
        if (clear_to_eol)
-           screen_fill(row, row + 1, msg_col, (int)Columns,
+           screen_fill(row, row + 1,
+                   cmdline_col_off + msg_col, cmdline_col_off + cmdline_width,
                    ' ', ' ', HL_ATTR(HLF_MSG));
 
        if (mp->sb_eol || mp->sb_next == NULL)
@@ -3090,14 +3092,15 @@ t_puts(
 {
     // output postponed text
     msg_didout = TRUE;         // remember that line is not empty
-    screen_puts_len(t_s, (int)(s - t_s), msg_row, msg_col, attr);
+    screen_puts_len(t_s, (int)(s - t_s), msg_row, cmdline_col_off + msg_col,
+           attr);
     msg_col += *t_col;
     *t_col = 0;
     // If the string starts with a composing character don't increment the
     // column position for it.
     if (enc_utf8 && utf_iscomposing(utf_ptr2char(t_s)))
        --msg_col;
-    if (msg_col >= Columns)
+    if (msg_col >= cmdline_width)
     {
        msg_col = 0;
        ++msg_row;
@@ -3173,7 +3176,7 @@ msg_puts_printf(char_u *str, int maxlen)
        if (cmdmsg_rl)
        {
            if (*s == CAR || *s == NL)
-               msg_col = Columns - 1;
+               msg_col = cmdline_width - 1;
            else
                --msg_col;
        }
@@ -3451,7 +3454,8 @@ do_more_prompt(int typed_char)
                    // scroll up, display line at bottom
                    msg_scroll_up();
                    inc_msg_scrolled();
-                   screen_fill((int)Rows - 2, (int)Rows - 1, 0, (int)Columns,
+                   screen_fill((int)Rows - 2, (int)Rows - 1,
+                           cmdline_col_off, cmdline_col_off + cmdline_width,
                            ' ', ' ', msg_attr);
                    mp_last = disp_sb_line((int)Rows - 2, mp_last, FALSE);
                    --toscroll;
@@ -3461,8 +3465,8 @@ do_more_prompt(int typed_char)
            if (toscroll <= 0)
            {
                // displayed the requested text, more prompt again
-               screen_fill((int)Rows - 1, (int)Rows, 0, (int)Columns,
-                       ' ', ' ', msg_attr);
+               screen_fill((int)Rows - 1, (int)Rows, cmdline_col_off,
+                       cmdline_col_off + cmdline_width, ' ', ' ', msg_attr);
                msg_moremsg(FALSE);
                continue;
            }
@@ -3475,7 +3479,8 @@ do_more_prompt(int typed_char)
     }
 
     // clear the --more-- message
-    screen_fill((int)Rows - 1, (int)Rows, 0, (int)Columns, ' ', ' ', msg_attr);
+    screen_fill((int)Rows - 1, (int)Rows, cmdline_col_off,
+           cmdline_col_off + cmdline_width, ' ', ' ', msg_attr);
     State = oldState;
     setmouse();
     if (quit_more)
@@ -3485,7 +3490,7 @@ do_more_prompt(int typed_char)
     }
 #ifdef FEAT_RIGHTLEFT
     else if (cmdmsg_rl)
-       msg_col = Columns - 1;
+       msg_col = cmdline_width - 1;
 #endif
 
     entered = FALSE;
@@ -3698,20 +3703,20 @@ mch_msg(char *str)
 msg_screen_putchar(int c, int attr)
 {
     msg_didout = TRUE;         // remember that line is not empty
-    screen_putchar(c, msg_row, msg_col, attr);
+    screen_putchar(c, msg_row, cmdline_col_off + msg_col, attr);
 #ifdef FEAT_RIGHTLEFT
     if (cmdmsg_rl)
     {
        if (--msg_col == 0)
        {
-           msg_col = Columns;
+           msg_col = cmdline_width;
            ++msg_row;
        }
     }
     else
 #endif
     {
-       if (++msg_col >= Columns)
+       if (++msg_col >= cmdline_width)
        {
            msg_col = 0;
            ++msg_row;
@@ -3726,11 +3731,11 @@ msg_moremsg(int full)
     char_u     *s = (char_u *)_("-- More --");
 
     attr = HL_ATTR(HLF_M);
-    screen_puts(s, (int)Rows - 1, 0, attr);
+    screen_puts(s, (int)Rows - 1, cmdline_col_off, attr);
     if (full)
        screen_puts((char_u *)
                _(" SPACE/d/j: screen/page/line down, b/u/k: up, q: quit "),
-               (int)Rows - 1, vim_strsize(s), attr);
+               (int)Rows - 1, cmdline_col_off + vim_strsize(s), attr);
 }
 
 /*
@@ -3754,7 +3759,7 @@ repeat_message(void)
 #endif
     else if (State == MODE_EXTERNCMD)
     {
-       windgoto(msg_row, msg_col); // put cursor back
+       windgoto(msg_row, cmdline_col_off + msg_col); // put cursor back
     }
     else if (State == MODE_HITRETURN || State == MODE_SETWSIZE)
     {
@@ -3786,8 +3791,8 @@ msg_check_screen(void)
 
     if (msg_row >= Rows)
        msg_row = Rows - 1;
-    if (msg_col >= Columns)
-       msg_col = Columns - 1;
+    if (msg_col >= cmdline_width)
+       msg_col = cmdline_width - 1;
     return TRUE;
 }
 
@@ -3833,17 +3838,21 @@ msg_clr_eos_force(void)
 #ifdef FEAT_RIGHTLEFT
        if (cmdmsg_rl)
        {
-           screen_fill(msg_row, msg_row + 1, 0, msg_col + 1,
+           screen_fill(msg_row, msg_row + 1,
+                   cmdline_col_off, cmdline_col_off + msg_col + 1,
                    ' ', ' ', msg_attr);
-           screen_fill(msg_row + 1, (int)Rows, 0, (int)Columns,
+           screen_fill(msg_row + 1, (int)Rows,
+                   cmdline_col_off, cmdline_col_off + cmdline_width,
                    ' ', ' ', msg_attr);
        }
        else
 #endif
        {
-           screen_fill(msg_row, msg_row + 1, msg_col, (int)Columns,
+           screen_fill(msg_row, msg_row + 1,
+                   cmdline_col_off + msg_col, cmdline_col_off + cmdline_width,
                    ' ', ' ', msg_attr);
-           screen_fill(msg_row + 1, (int)Rows, 0, (int)Columns,
+           screen_fill(msg_row + 1, (int)Rows,
+                   cmdline_col_off, cmdline_col_off + cmdline_width,
                    ' ', ' ', msg_attr);
        }
     }
@@ -4152,11 +4161,11 @@ msg_advance(int col)
        msg_col = col;          // for redirection, may fill it up later
        return;
     }
-    if (col >= Columns)                // not enough room
-       col = Columns - 1;
+    if (col >= cmdline_width)  // not enough room
+       col = cmdline_width - 1;
 #ifdef FEAT_RIGHTLEFT
     if (cmdmsg_rl)
-       while (msg_col > Columns - col)
+       while (msg_col > cmdline_width - col)
            msg_putchar(' ');
     else
 #endif
diff --git a/src/misc1.c b/src/misc1.c
index 8af50fc5a..3ef007c35 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -1017,7 +1017,7 @@ get_number(
     ++allow_keys;              // no mapping here, but recognize keys
     for (;;)
     {
-       windgoto(msg_row, msg_col);
+       windgoto(msg_row, cmdline_col_off + msg_col);
        c = safe_vgetc();
        if (VIM_ISDIGIT(c))
        {
@@ -2283,7 +2283,7 @@ prepare_to_exit(void)
     else
 #endif
     {
-       windgoto((int)Rows - 1, 0);
+       windgoto((int)Rows - 1, cmdline_col_off);
 
        /*
         * Switch terminal mode back now, so messages end up on the "normal"
diff --git a/src/mouse.c b/src/mouse.c
index d73e831d3..4bd1e592f 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -484,9 +484,8 @@ do_mouse(
 
     // Check for clicking in the tab page panel.
 #if defined(FEAT_TABPANEL)
-    if (mouse_row < firstwin->w_winrow + topframe->fr_height
-       && (mouse_col < firstwin->w_wincol
-               || mouse_col >= firstwin->w_wincol + topframe->fr_width))
+    if (mouse_col < firstwin->w_wincol
+               || mouse_col >= firstwin->w_wincol + topframe->fr_width)
     {
        tp_label.is_panel = true;
        tp_label.just_in = true;
diff --git a/src/normal.c b/src/normal.c
index 0f336a276..59843293e 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -1856,12 +1856,13 @@ display_showcmd(void)
     else // 'showcmdloc' is "last" or empty
     {
        if (!showcmd_is_clear)
-           screen_puts(showcmd_buf, (int)Rows - 1, sc_col, 0);
+           screen_puts(showcmd_buf, (int)Rows - 1,
+                   cmdline_col_off + sc_col, 0);
 
        // clear the rest of an old message by outputting up to SHOWCMD_COLS
        // spaces
        screen_puts((char_u *)"          " + len,
-                                               (int)Rows - 1, sc_col + len, 0);
+               (int)Rows - 1, cmdline_col_off + sc_col + len, 0);
     }
 
     setcursor();           // put cursor back where it belongs
diff --git a/src/os_unix.c b/src/os_unix.c
index 829219d8e..fdae5d67f 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -3753,7 +3753,7 @@ exit_scroll(void)
     {
        restore_cterm_colors();         // get original colors back
        msg_clr_eos_force();            // clear the rest of the display
-       windgoto((int)Rows - 1, 0);     // may have moved the cursor
+       windgoto((int)Rows - 1, cmdline_col_off); // may have moved the cursor
     }
 }
 
@@ -5556,7 +5556,7 @@ mch_call_shell_fork(
                                else
                                    msg_outtrans_len(ta_buf + i, 1);
                            }
-                           windgoto(msg_row, msg_col);
+                           windgoto(msg_row, cmdline_col_off + msg_col);
                            out_flush();
                        }
 
@@ -5678,7 +5678,7 @@ mch_call_shell_fork(
                            msg_puts((char *)buffer);
                        }
 
-                       windgoto(msg_row, msg_col);
+                       windgoto(msg_row, cmdline_col_off + msg_col);
                        cursor_on();
                        out_flush();
                        if (got_int)
diff --git a/src/os_win32.c b/src/os_win32.c
index 43a3da5d8..182d005aa 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -4436,7 +4436,7 @@ handler_routine(
     case CTRL_CLOSE_EVENT:
     case CTRL_LOGOFF_EVENT:
     case CTRL_SHUTDOWN_EVENT:
-       windgoto((int)Rows - 1, 0);
+       windgoto((int)Rows - 1, cmdline_col_off);
        g_fForceExit = TRUE;
 
        vim_snprintf((char *)IObuff, IOSIZE, _("Vim: Caught %s event
"),
@@ -5058,7 +5058,7 @@ dump_pipe(int         options,
            msg_puts((char *)buffer);
        }
 
-       windgoto(msg_row, msg_col);
+       windgoto(msg_row, cmdline_col_off + msg_col);
        cursor_on();
        out_flush();
     }
@@ -5257,7 +5257,7 @@ mch_system_piped(char *cmd, int options)
                        else
                            msg_outtrans_len(ta_buf + i, 1);
                    }
-                   windgoto(msg_row, msg_col);
+                   windgoto(msg_row, cmdline_col_off + msg_col);
                    out_flush();
 
                    ta_len += len;
diff --git a/src/screen.c b/src/screen.c
index 80da91c53..bbb4bbaaf 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -1060,7 +1060,7 @@ win_redr_custom(
        row = statusline_row(wp);
        fillchar = fillchar_status(&attr, wp);
        int in_status_line = wp->w_status_height != 0;
-       maxwidth = in_status_line ? wp->w_width : Columns;
+       maxwidth = in_status_line ? wp->w_width : cmdline_width;
 
        if (draw_ruler)
        {
@@ -1077,7 +1077,7 @@ win_redr_custom(
                if (*stl++ != '(')
                    stl = p_ruf;
            }
-           col = ru_col - (Columns - maxwidth);
+           col = ru_col - (cmdline_width - maxwidth);
            if (col < (maxwidth + 1) / 2)
                col = (maxwidth + 1) / 2;
            maxwidth -= col;
@@ -1103,6 +1103,8 @@ win_redr_custom(
 
        if (in_status_line)
            col += wp->w_wincol;
+       else
+           col += cmdline_col_off;
     }
 
     if (maxwidth <= 0)
@@ -1187,7 +1189,7 @@ win_redr_custom(
            p = tabtab[n].start;
            fillchar = tabtab[n].userhl;
        }
-       while (col < Columns)
+       while (col < firstwin->w_wincol + topframe->fr_width)
            TabPageIdxs[col++] = fillchar;
     }
 
@@ -2325,14 +2327,16 @@ screen_fill(
        if (row == Rows - 1)            // overwritten the command line
        {
            redraw_cmdline = TRUE;
-           if (start_col == 0 && end_col == Columns
+           if (((start_col == 0 && end_col == Columns)
+                       || (start_col <= cmdline_col_off
+                       && end_col == cmdline_col_off + cmdline_width))
                    && c1 == ' ' && c2 == ' ' && attr == 0
 #ifdef FEAT_PROP_POPUP
                    && !popup_overlaps_cmdline()
 #endif
                    )
                clear_cmdline = FALSE;  // command line has been cleared
-           if (start_col == 0)
+           if (start_col == 0 || start_col == cmdline_col_off)
                mode_displayed = FALSE; // mode cleared or overwritten
        }
     }
@@ -2725,8 +2729,8 @@ give_up:
            msg_row = Rows - 1;         // put cursor at last row
        else if (Rows > old_Rows)       // Rows got bigger
            msg_row += Rows - old_Rows; // put cursor in same place
-       if (msg_col >= Columns)         // Columns got smaller
-           msg_col = Columns - 1;      // put cursor at last column
+       if (msg_col >= cmdline_width)   // cmdline_width got smaller
+           msg_col = cmdline_width - 1;    // put cursor at last cmdline column
     }
 #endif
     clear_TabPageIdxs();
@@ -4097,7 +4101,7 @@ showmode(void)
            {
                // These messages can get long, avoid a wrap in a narrow
                // window.  Prefer showing edit_submode_extra.
-               length = (Rows - msg_row) * Columns - 3;
+               length = (Rows - msg_row) * cmdline_width - 3;
                if (edit_submode_extra != NULL)
                    length -= vim_strsize(edit_submode_extra);
                if (length > 0)
@@ -4611,8 +4615,8 @@ comp_col(void)
        if (!p_ru || last_has_status)       // no need for separating space
            ++sc_col;
     }
-    sc_col = Columns - sc_col;
-    ru_col = Columns - ru_col;
+    sc_col = cmdline_width - sc_col;
+    ru_col = cmdline_width - ru_col;
     if (sc_col <= 0)           // screen too narrow, will become a mess
        sc_col = 1;
     if (ru_col <= 0)
diff --git a/src/search.c b/src/search.c
index ede51f5f0..0855891b0 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1478,10 +1478,11 @@ do_search(
                // msg_strtrunc() will shorten in the middle.
                if (msg_scrolled != 0 && !cmd_silent)
                    // Use all the columns.
-                   msgbufsize = (int)(Rows - msg_row) * Columns - 1;
+                   msgbufsize = (int)(Rows - msg_row) * cmdline_width - 1;
                else
                    // Use up to 'showcmd' column.
-                   msgbufsize = (int)(Rows - msg_row - 1) * Columns + sc_col - 
1;
+                   msgbufsize = (int)(Rows - msg_row - 1) * cmdline_width
+                       + sc_col - 1;
                if (msgbufsize < plen + off_len + SEARCH_STAT_BUF_LEN + 3)
                    msgbufsize = plen + off_len + SEARCH_STAT_BUF_LEN + 3;
            }
diff --git a/src/spellsuggest.c b/src/spellsuggest.c
index 9383c93b7..87efd0d5b 100644
--- a/src/spellsuggest.c
+++ b/src/spellsuggest.c
@@ -568,7 +568,7 @@ spell_suggest(int count)
        // When 'rightleft' is set the list is drawn right-left.
        cmdmsg_rl = curwin->w_p_rl;
        if (cmdmsg_rl)
-           msg_col = Columns - 1;
+           msg_col = cmdline_width - 1;
 #endif
 
        // List the suggestions.
diff --git a/src/syntax.c b/src/syntax.c
index c44ccad68..ed4c1225f 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -4085,8 +4085,8 @@ syn_list_cluster(int id)
 
     if (msg_col >= endcol)     // output at least one space
        endcol = msg_col + 1;
-    if (Columns <= (long)endcol)       // avoid hang for tiny window
-       endcol = (int)(Columns - 1);
+    if (cmdline_width <= endcol)       // avoid hang for tiny window
+       endcol = cmdline_width - 1;
 
     msg_advance(endcol);
     if (SYN_CLSTR(curwin->w_s)[id].scl_list != NULL)
diff --git a/src/tabpanel.c b/src/tabpanel.c
index 867171e46..f2bccea1b 100644
--- a/src/tabpanel.c
+++ b/src/tabpanel.c
@@ -163,7 +163,7 @@ draw_tabpanel(void)
            do_by_tplmode(TPLMODE_REDRAW, VERT_LEN, maxwidth, &curtab_row,
                    NULL);
            // draw vert separator in tabpanel
-           for (vsrow = 0; vsrow < cmdline_row; vsrow++)
+           for (vsrow = 0; vsrow < Rows; vsrow++)
                screen_putchar(curwin->w_fill_chars.tpl_vert, vsrow,
                        topframe->fr_width, vs_attr);
        }
@@ -175,7 +175,7 @@ draw_tabpanel(void)
            do_by_tplmode(TPLMODE_REDRAW, 0, maxwidth - VERT_LEN,
                    &curtab_row, NULL);
            // draw vert separator in tabpanel
-           for (vsrow = 0; vsrow < cmdline_row; vsrow++)
+           for (vsrow = 0; vsrow < Rows; vsrow++)
                screen_putchar(curwin->w_fill_chars.tpl_vert, vsrow,
                        maxwidth - VERT_LEN, vs_attr);
        }
@@ -516,7 +516,7 @@ do_by_tplmode(
     typval_T   v;
     tabpanel_T args;
 
-    args.maxrow = cmdline_row;
+    args.maxrow = Rows;
     args.offsetrow = 0;
     args.col_start = col_start;
     args.col_end = col_end;
diff --git a/src/tag.c b/src/tag.c
index 58e12a668..23573fe88 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -975,7 +975,7 @@ print_tag_list(
     taglen = (int)(tagp.tagname_end - tagp.tagname + 2);
     if (taglen < 18)
        taglen = 18;
-    if (taglen > Columns - 25)
+    if (taglen > cmdline_width - 25)
        taglen = MAXCOL;
     if (msg_col == 0)
        msg_didout = FALSE;     // overwrite previous message
@@ -1055,7 +1055,7 @@ print_tag_list(
                attr = HL_ATTR(HLF_CM);
                while (*p && *p != '
' && *p != '
')
                {
-                   if (msg_col + ptr2cells(p) >= Columns)
+                   if (msg_col + ptr2cells(p) >= cmdline_width)
                    {
                        msg_putchar('
');
                        if (got_int)
@@ -1103,7 +1103,7 @@ print_tag_list(
 
        while (p != command_end)
        {
-           if (msg_col + (*p == TAB ? 1 : ptr2cells(p)) > Columns)
+           if (msg_col + (*p == TAB ? 1 : ptr2cells(p)) > cmdline_width)
                msg_putchar('
');
            if (got_int)
                break;
diff --git a/src/testdir/dumps/Test_tabpanel_commandline_0.dump 
b/src/testdir/dumps/Test_tabpanel_commandline_0.dump
index 5ed359c4b..72e888d55 100644
--- a/src/testdir/dumps/Test_tabpanel_commandline_0.dump
+++ b/src/testdir/dumps/Test_tabpanel_commandline_0.dump
@@ -6,5 +6,5 @@
 | +1#0000000&@9|~+0#4040ff13&| @33
 | +1#0000000&@9|~+0#4040ff13&| @33
 | +1#0000000&@9|~+0#4040ff13&| @33
-|a+0#0000001#ffff4012|b@1|r|e|v|i|a|t|e| +3#0000000#ffffff0@1|a|b|c|l|e|a|r| 
@1|a|b|o|v|e|l|e|f|t| @1|a|b|s|t|r|a|c|t| @4
-|:+0&&|a|b@1|r|e|v|i|a|t|e> @33
+| +1#0000000&@9|a+0#0000001#ffff4012|b@1|r|e|v|i|a|t|e| 
+3#0000000#ffffff0@1|a|b|c|l|e|a|r| @1|a|b|o|v|e|l|e|f|t| @1|>| @1
+| +1&&@9|:+0&&|a|b@1|r|e|v|i|a|t|e> @23
diff --git a/src/testdir/dumps/Test_tabpanel_commandline_1.dump 
b/src/testdir/dumps/Test_tabpanel_commandline_1.dump
index a44f54eed..0e10d3dfe 100644
--- a/src/testdir/dumps/Test_tabpanel_commandline_1.dump
+++ b/src/testdir/dumps/Test_tabpanel_commandline_1.dump
@@ -3,8 +3,8 @@
 | +1#0000000&@9|~+0#4040ff13&| @33
 | +1#0000000&@9|~+0#4040ff13&| @33
 | +1#0000000&@9|~+0#4040ff13&| @33
-| +0#0000001#e0e0e08|a|b@1|r|e|v|i|a|t|e| @4| +0#4040ff13#ffffff0@28
-| +0#0000001#ffd7ff255|a|b|c|l|e|a|r| @7| +0#4040ff13#ffffff0@28
-| +0#0000001#ffd7ff255|a|b|o|v|e|l|e|f|t| @5| +0#4040ff13#ffffff0@28
-| +0#0000001#ffd7ff255|a|b|s|t|r|a|c|t| @6| +0#4040ff13#ffffff0@28
-|:+0#0000000&|a|b@1|r|e|v|i|a|t|e> @33
+| +1#0000000&@9| +0#0000001#e0e0e08|a|b@1|r|e|v|i|a|t|e| @4| 
+0#4040ff13#ffffff0@18
+| +1#0000000&@9| +0#0000001#ffd7ff255|a|b|c|l|e|a|r| @7| +0#4040ff13#ffffff0@18
+| +1#0000000&@9| +0#0000001#ffd7ff255|a|b|o|v|e|l|e|f|t| @5| 
+0#4040ff13#ffffff0@18
+| +1#0000000&@9| +0#0000001#ffd7ff255|a|b|s|t|r|a|c|t| @6| 
+0#4040ff13#ffffff0@18
+| +1#0000000&@9|:+0&&|a|b@1|r|e|v|i|a|t|e> @23
diff --git a/src/testdir/dumps/Test_tabpanel_dont_overflow_into_tabpanel_0.dump 
b/src/testdir/dumps/Test_tabpanel_dont_overflow_into_tabpanel_0.dump
index 6076978d0..5eea1822d 100644
--- a/src/testdir/dumps/Test_tabpanel_dont_overflow_into_tabpanel_0.dump
+++ b/src/testdir/dumps/Test_tabpanel_dont_overflow_into_tabpanel_0.dump
@@ -7,4 +7,4 @@
 | +1#0000000&@9|~+0#4040ff13&| @33
 | +1#0000000&@9|~+0#4040ff13&| @33
 | +1#0000000&@9|~+0#4040ff13&| @33
-| +0#0000000&@26|1|,|1| @10|A|l@1| 
+| +1#0000000&@9| +0&&@17|1|,|1| @9|A|l@1| 
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_01.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_01.dump
index 74ba073e0..351d9fe0a 100644
--- a/src/testdir/dumps/Test_tabpanel_drawing_01.dump
+++ b/src/testdir/dumps/Test_tabpanel_drawing_01.dump
@@ -3,4 +3,4 @@
 | +1#0000000&@15|~+0#4040ff13&| @27
 | +1#0000000&@15|~+0#4040ff13&| @27
 | +1#0000000&@15|~+0#4040ff13&| @27
-| +0#0000000&@26|0|,|0|-|1| @8|A|l@1| 
+| +1#0000000&@15| +0&&@14|0|,|0|-|1| @4|A|l@1| 
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_02.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_02.dump
index f7567dc3b..d8a4242d9 100644
--- a/src/testdir/dumps/Test_tabpanel_drawing_02.dump
+++ b/src/testdir/dumps/Test_tabpanel_drawing_02.dump
@@ -3,4 +3,4 @@
 | +1#0000000&@15|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @6
 | +1#0000000&@15|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @6
 | +1#0000000&@15|<+3&&|a|b|p|a|n|e|l|1| |0|,|0|-|1| @1|A|l@1| |<+1&&|l|1| 
|0|,|0|-
-| +0&&@44
+| @15| +0&&@28
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_03.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_03.dump
index cb67b9e9b..c4fcc5cbd 100644
--- a/src/testdir/dumps/Test_tabpanel_drawing_03.dump
+++ b/src/testdir/dumps/Test_tabpanel_drawing_03.dump
@@ -3,4 +3,4 @@
 | +1&&@15|c+0&&| @18||+1&&|c+0&&| @6
 | +1&&@15|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @6
 | +1#0000000&@15|<+3&&|n|e|l|1| |[|+|]| |1|,|1| @3|A|l@1| |<+1&&|+|]| |1|,|1| 
-| +0&&@44
+@16| +0&&@28
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_04.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_04.dump
index dd3c82e1a..507c244ee 100644
--- a/src/testdir/dumps/Test_tabpanel_drawing_04.dump
+++ b/src/testdir/dumps/Test_tabpanel_drawing_04.dump
@@ -3,4 +3,4 @@
 | +1&&@15|f+0&&| @27
 | +1&&@15|~+0#4040ff13&| @27
 | +1#0000000&@15|~+0#4040ff13&| @27
-| +0#0000000&@26|1|,|1| @10|A|l@1| 
+| +1#0000000&@15| +0&&@14|1|,|1| @6|A|l@1| 
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_05.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_05.dump
index 08e040bdf..971eb9320 100644
--- a/src/testdir/dumps/Test_tabpanel_drawing_05.dump
+++ b/src/testdir/dumps/Test_tabpanel_drawing_05.dump
@@ -3,4 +3,4 @@
 | +2&&@15|f+0&&| @27
 |2+2&&|:|X+0#4040ff13&|t|a|b|p|a|n|e|l|2| +2#0000000&@3|~+0#4040ff13&| @27
 | +1#0000000&@15|~+0#4040ff13&| @27
-| +0#0000000&@26|1|,|1| @10|A|l@1| 
+| +1#0000000&@15| +0&&@14|1|,|1| @6|A|l@1| 
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_06.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_06.dump
index b5935d37c..f7e535724 100644
--- a/src/testdir/dumps/Test_tabpanel_drawing_06.dump
+++ b/src/testdir/dumps/Test_tabpanel_drawing_06.dump
@@ -3,4 +3,4 @@
 |f+0#0000000#ffffff0| @27| +2&&@15
 |~+0#4040ff13&| @27|2+2#0000000&|:|X+0#4040ff13&|t|a|b|p|a|n|e|l|2| 
+2#0000000&@3
 |~+0#4040ff13&| @27| +1#0000000&@15
-| +0&&@26|1|,|1| @10|A|l@1| 
+| +0&&@14|1|,|1| @6|A|l@1| | +1&&@15
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_07.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_07.dump
index 440988b6e..e1e44632f 100644
--- a/src/testdir/dumps/Test_tabpanel_drawing_07.dump
+++ b/src/testdir/dumps/Test_tabpanel_drawing_07.dump
@@ -3,4 +3,4 @@
 |~+0#4040ff13#ffffff0| @27| +8#0000001#e0e0e08@15
 |~+0#4040ff13#ffffff0| 
@27|2+8#0000001#e0e0e08|:|X+0#4040ff13#ffffff0|t|a|b|p|a|n|e|l|2| 
+8#0000001#e0e0e08@3
 |~+0#4040ff13#ffffff0| @27| +2#0000000&@15
-| +0&&@26|0|,|0|-|1| @8|A|l@1| 
+| +0&&@14|0|,|0|-|1| @4|A|l@1| |<+2&&|!+0#4040ff13&|p|t|y| |[|T|e|r|m|i|n|a|l|]
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_08.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_08.dump
index 57bbf923e..ae3cadbb1 100644
--- a/src/testdir/dumps/Test_tabpanel_drawing_08.dump
+++ b/src/testdir/dumps/Test_tabpanel_drawing_08.dump
@@ -3,4 +3,4 @@
 |c+0&&| @18||+1&&|c+0&&| @6| +1&&@15
 |~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @6| +1#0000000&@15
 |<+3&&|n|e|l|1| |[|+|]| |1|,|1| @3|A|l@1| |<+1&&|+|]| |1|,|1| @16
-| +0&&@26|1|,|1| @10|A|l@1| 
+| +0&&@14|1|,|1| @6|A|l@1| | +1&&@15
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_2_0.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_2_0.dump
index 8dee217e3..23fe3c8e4 100644
--- a/src/testdir/dumps/Test_tabpanel_drawing_2_0.dump
+++ b/src/testdir/dumps/Test_tabpanel_drawing_2_0.dump
@@ -7,4 +7,4 @@
 |~+0#4040ff13&| @56||+1#0000000&| @18
 |~+0#4040ff13&| @56||+1#0000000&| @18
 |~+0#4040ff13&| @56||+1#0000000&| @18
-|-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@47|2|,|1| @10|A|l@1| 
+|-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@27|2|,|1| @10|A|l@1| ||+1&&| @18
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_2_1.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_2_1.dump
index c3d257dc6..d82adb29a 100644
--- a/src/testdir/dumps/Test_tabpanel_drawing_2_1.dump
+++ b/src/testdir/dumps/Test_tabpanel_drawing_2_1.dump
@@ -7,4 +7,4 @@
 | +1#0000000&@18|||~+0#4040ff13&| @56
 | +1#0000000&@18|||~+0#4040ff13&| @56
 | +1#0000000&@18|||~+0#4040ff13&| @56
-|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@47|2|,|1| @10|A|l@1| 
+| +1#0000000&@18|||-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@27|2|,|1| @10|A|l@1| 
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_fill_tailing_0.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_fill_tailing_0.dump
index 4ca56d419..e349d118a 100644
--- a/src/testdir/dumps/Test_tabpanel_drawing_fill_tailing_0.dump
+++ b/src/testdir/dumps/Test_tabpanel_drawing_fill_tailing_0.dump
@@ -7,4 +7,4 @@
 |b+2#0000000&@2|.|t|x|t| @12|~+0#4040ff13&| @23
 |B+2#0000000&|O|T@1|O|M| @13|~+0#4040ff13&| @23
 | +1#0000000&@19|~+0#4040ff13&| @23
-| +0#0000000&@26|0|,|0|-|1| @8|A|l@1| 
+| +1#0000000&@19| +0&&@12|0|,|0|-|1| @2|A|l@1| 
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_pum_0.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_pum_0.dump
index d98dbfdd6..716f720e7 100644
--- a/src/testdir/dumps/Test_tabpanel_drawing_pum_0.dump
+++ b/src/testdir/dumps/Test_tabpanel_drawing_pum_0.dump
@@ -7,4 +7,4 @@
 | +1&&@19|~+0#4040ff13&| @23
 | +1#0000000&@19|~+0#4040ff13&| @23
 | +1#0000000&@19|~+0#4040ff13&| @23
-|-+2#0000000&@1| |m+0#00e0003&|a|t|c|h| |1| |o|f| |4| +0#0000000&@29
+| +1#0000000&@19|-+2&&@1| |m+0#00e0003&|a|t|c|h| |1| |o|f| |4| +0#0000000&@9
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_pum_1.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_pum_1.dump
index 17e0c971f..d481d6bcf 100644
--- a/src/testdir/dumps/Test_tabpanel_drawing_pum_1.dump
+++ b/src/testdir/dumps/Test_tabpanel_drawing_pum_1.dump
@@ -7,4 +7,4 @@
 | +1&&@19| +0&&@1|a@2|b> @18
 | +1&&@19|~+0#4040ff13&| @23
 | +1#0000000&@19|~+0#4040ff13&| @23
-|-+2#0000000&@1| |m+0#00e0003&|a|t|c|h| |1| |o|f| |4| +0#0000000&@29
+| +1#0000000&@19|-+2&&@1| |m+0#00e0003&|a|t|c|h| |1| |o|f| |4| +0#0000000&@9
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_pum_2.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_pum_2.dump
index 4ea7b9140..16898d03c 100644
--- a/src/testdir/dumps/Test_tabpanel_drawing_pum_2.dump
+++ b/src/testdir/dumps/Test_tabpanel_drawing_pum_2.dump
@@ -7,4 +7,4 @@
 | +0&&@21| +0#0000001#ffd7ff255|a@2|b| @10| +1#0000000#ffffff0@6
 | +0&&@22|a@1| +1&&@19
 >~+0#4040ff13&| @23| +1#0000000&@19
-|-+2&&@1| |m+0#00e0003&|a|t|c|h| |1| |o|f| |4| +0#0000000&@29
+|-+2&&@1| |m+0#00e0003&|a|t|c|h| |1| |o|f| |4| +0#0000000&@9| +1&&@19
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_scrolling_0.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_scrolling_0.dump
index fa1947eb4..3d9a57b4e 100644
--- a/src/testdir/dumps/Test_tabpanel_drawing_scrolling_0.dump
+++ b/src/testdir/dumps/Test_tabpanel_drawing_scrolling_0.dump
@@ -7,4 +7,4 @@
 | +1#0000000&@19| +0#af5f00255&|1|5| |t+0#0000000&|e|x|t| |t|e|x|t| |t|e|x|t| 
|t||+1&&| +0#af5f00255&@1|7| 
 | +1#0000000&@19| +0#af5f00255&|1|6| |t+0#0000000&|e|x|t| |t|e|x|t| |t|e|x|t| 
|t||+1&&| +0#af5f00255&@1|8| 
 | +1#0000000&@19|<+3&&|.|t|x|t| |[|+|]| |1|2|,|1| @3|8|%| |<+1&&| |1|,
-| +0&&@44
+| @19| +0&&@24
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_scrolling_1.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_scrolling_1.dump
index 6370449b6..460ba30fc 100644
--- a/src/testdir/dumps/Test_tabpanel_drawing_scrolling_1.dump
+++ b/src/testdir/dumps/Test_tabpanel_drawing_scrolling_1.dump
@@ -7,4 +7,4 @@
 | +1&&@19| +0#af5f00255&|1|7| |t+0#0000000&|e|x|t| |t|e|x|t| |t|e|x|t| 
|t|e|x|t| @1
 | +1&&@19| +0#af5f00255&|1|8| |t+0#0000000&|e|x|t| |t|e|x|t| |t|e|x|t| 
|t|e|x|t| @1
 | +1&&@19|b+3&&@2|.|t|x|t| |[|+|]| @1|1|6|,|1| @4|1|4|%
-| +0&&@44
+| +1&&@19| +0&&@24
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_scrolling_2.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_scrolling_2.dump
index 50b55ea41..d4afaf7f3 100644
--- a/src/testdir/dumps/Test_tabpanel_drawing_scrolling_2.dump
+++ b/src/testdir/dumps/Test_tabpanel_drawing_scrolling_2.dump
@@ -7,4 +7,4 @@
 | +1&&@19| +0#af5f00255&@1|2| |t+0#0000000&|e|x|t| |t|e|x|t| |t|e|x|t| 
|t|e|x|t| @1
 | +1&&@19| +0#af5f00255&@1|3| |t+0#0000000&|e|x|t| |t|e|x|t| |t|e|x|t| 
|t|e|x|t| @1
 | +1&&@19|b@2|.|t|x|t| |[|+|]| @1|1|,|1| @5|T|o|p
-| +0&&@44
+| @19| +0&&@24
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_scrolling_3.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_scrolling_3.dump
index fdde1ab7c..b041b672f 100644
--- a/src/testdir/dumps/Test_tabpanel_drawing_scrolling_3.dump
+++ b/src/testdir/dumps/Test_tabpanel_drawing_scrolling_3.dump
@@ -7,4 +7,4 @@
 | +1&&@19| +0#af5f00255&@1|7| ||+1#0000000&| +0#af5f00255&|3|1| 
|t+0#0000000&|e|x|t| |t|e|x|t| |t|e|x|t| |t
 | +1&&@19| +0#af5f00255&@1|8| ||+1#0000000&| +0#af5f00255&|3|2| 
|t+0#0000000&|e|x|t| |t|e|x|t| |t|e|x|t| |t
 | +1&&@19|<| |1|,| |<+3&&|.|t|x|t| |[|+|]| |2|8|,|1| @2|2|6|%
-| +0&&@44
+| +1&&@19| +0&&@24
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_with_popupwin_1.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_with_popupwin_1.dump
index 72cf385ac..6553f54ba 100644
--- a/src/testdir/dumps/Test_tabpanel_drawing_with_popupwin_1.dump
+++ b/src/testdir/dumps/Test_tabpanel_drawing_with_popupwin_1.dump
@@ -7,4 +7,4 @@
 | +1&&@19|.+0&&@24
 | +1&&@19|.+0&&@24
 | +1&&@19|.+0&&@24
-| @44
+| +1&&@19| +0&&@24
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_with_popupwin_2.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_with_popupwin_2.dump
index bee1803c7..20882dc29 100644
--- a/src/testdir/dumps/Test_tabpanel_drawing_with_popupwin_2.dump
+++ b/src/testdir/dumps/Test_tabpanel_drawing_with_popupwin_2.dump
@@ -7,4 +7,4 @@
 |.+0&&@24| +1&&@19
 |.+0&&@24| +1&&@19
 |.+0&&@24| +1&&@19
-| +0&&@44
+| +0&&@24| +1&&@19
diff --git a/src/testdir/dumps/Test_tabpanel_equalalways_0.dump 
b/src/testdir/dumps/Test_tabpanel_equalalways_0.dump
index 62a9b4016..90888895f 100644
--- a/src/testdir/dumps/Test_tabpanel_equalalways_0.dump
+++ b/src/testdir/dumps/Test_tabpanel_equalalways_0.dump
@@ -7,4 +7,4 @@
 | +1&&@19|~+0#4040ff13&| @56
 | +1#0000000&@19|~+0#4040ff13&| @56
 | +1#0000000&@19|[|N|o| |N|a|m|e|]| @30|0|,|0|-|1| @9|A|l@1
-| +0&&@77
+| @19| +0&&@57
diff --git a/src/testdir/dumps/Test_tabpanel_equalalways_1.dump 
b/src/testdir/dumps/Test_tabpanel_equalalways_1.dump
index 2ebcacee9..ba228e327 100644
--- a/src/testdir/dumps/Test_tabpanel_equalalways_1.dump
+++ b/src/testdir/dumps/Test_tabpanel_equalalways_1.dump
@@ -7,4 +7,4 @@
 | +1&&@9|~+0#4040ff13&| @66
 | +1#0000000&@9|~+0#4040ff13&| @66
 | +1#0000000&@9|[|N|o| |N|a|m|e|]| @40|0|,|0|-|1| @9|A|l@1
-|:+0&&|s|e|t| |t|a|b|p|a|n|e|l|o|p|t|=|c|o|l|u|m|n|s|:|1|0| @50
+| @9| +0&&@67
diff --git a/src/testdir/dumps/Test_tabpanel_equalalways_2.dump 
b/src/testdir/dumps/Test_tabpanel_equalalways_2.dump
index baf823937..bf6a6900f 100644
--- a/src/testdir/dumps/Test_tabpanel_equalalways_2.dump
+++ b/src/testdir/dumps/Test_tabpanel_equalalways_2.dump
@@ -7,4 +7,4 @@
 | +1&&@29|~+0#4040ff13&| @46
 | +1#0000000&@29|~+0#4040ff13&| @46
 | +1#0000000&@29|[|N|o| |N|a|m|e|]| @20|0|,|0|-|1| @9|A|l@1
-|:+0&&|s|e|t| |t|a|b|p|a|n|e|l|o|p|t|=|c|o|l|u|m|n|s|:|3|0| @50
+| @29| +0&&@47
diff --git a/src/testdir/dumps/Test_tabpanel_equalalways_3.dump 
b/src/testdir/dumps/Test_tabpanel_equalalways_3.dump
index c7f5f4ce7..b8c80524f 100644
--- a/src/testdir/dumps/Test_tabpanel_equalalways_3.dump
+++ b/src/testdir/dumps/Test_tabpanel_equalalways_3.dump
@@ -7,4 +7,4 @@
 | +1&&@4|~+0#4040ff13&| @71
 | +1#0000000&@4|~+0#4040ff13&| @71
 | +1#0000000&@4|[|N|o| |N|a|m|e|]| @45|0|,|0|-|1| @9|A|l@1
-|:+0&&|s|e|t| |t|a|b|p|a|n|e|l|o|p|t|=|c|o|l|u|m|n|s|:|5| @51
+| @4| +0&&@72
diff --git 
a/src/testdir/dumps/Test_tabpanel_eval_tabpanel_statusline_tabline_0.dump 
b/src/testdir/dumps/Test_tabpanel_eval_tabpanel_statusline_tabline_0.dump
index dd930c451..a8df2d1f1 100644
--- a/src/testdir/dumps/Test_tabpanel_eval_tabpanel_statusline_tabline_0.dump
+++ b/src/testdir/dumps/Test_tabpanel_eval_tabpanel_statusline_tabline_0.dump
@@ -7,4 +7,4 @@
 | +1#0000000&@8|||~+0#4040ff13&| @33
 | +1#0000000&@8|||~+0#4040ff13&| @33
 | +1#0000000&@8|||$+3&&| @13|[|c@2|]| @13|$
-|"+0&&|c@2|"| |[|N|e|w|]| @33
+| +1&&@8|||"+0&&|c@2|"| |[|N|e|w|]| @23
diff --git 
a/src/testdir/dumps/Test_tabpanel_eval_tabpanel_statusline_tabline_1.dump 
b/src/testdir/dumps/Test_tabpanel_eval_tabpanel_statusline_tabline_1.dump
index 21bb63b84..7285afbee 100644
--- a/src/testdir/dumps/Test_tabpanel_eval_tabpanel_statusline_tabline_1.dump
+++ b/src/testdir/dumps/Test_tabpanel_eval_tabpanel_statusline_tabline_1.dump
@@ -7,4 +7,4 @@
 |~+0#4040ff13&| @33||+1#0000000&| @8
 |~+0#4040ff13&| @33||+1#0000000&| @8
 |$+3&&| @13|[|c@2|]| @13|$||+1&&| @8
-|:+0&&|s|e|t| |t|a|b|p|a|n|e|l|o|p|t|+|=|a|l|i|g|n|:|r|i|g|h|t| @15
+| +0&&@34||+1&&| @8
diff --git 
a/src/testdir/dumps/Test_tabpanel_eval_tabpanel_with_linebreaks_0.dump 
b/src/testdir/dumps/Test_tabpanel_eval_tabpanel_with_linebreaks_0.dump
index b062f214d..80f06ce74 100644
--- a/src/testdir/dumps/Test_tabpanel_eval_tabpanel_with_linebreaks_0.dump
+++ b/src/testdir/dumps/Test_tabpanel_eval_tabpanel_with_linebreaks_0.dump
@@ -7,4 +7,4 @@
 |t+2#0000000&|o|p| @6|~+0#4040ff13&| @33
 |$+2#0000000&| |[|c@2|]| @1|$|~+0#4040ff13&| @33
 |b+2#0000000&|o|t@1|o|m| @3|~+0#4040ff13&| @33
-|"+0#0000000&|c@2|"| |[|N|e|w|]| @33
+| +1#0000000&@9|"+0&&|c@2|"| |[|N|e|w|]| @23
diff --git 
a/src/testdir/dumps/Test_tabpanel_eval_tabpanel_with_linebreaks_1.dump 
b/src/testdir/dumps/Test_tabpanel_eval_tabpanel_with_linebreaks_1.dump
index 4e5a3fb1d..bf381f669 100644
--- a/src/testdir/dumps/Test_tabpanel_eval_tabpanel_with_linebreaks_1.dump
+++ b/src/testdir/dumps/Test_tabpanel_eval_tabpanel_with_linebreaks_1.dump
@@ -7,4 +7,4 @@
 |~+0#4040ff13#ffffff0| @33|t+2#0000000&|o|p| @6
 |~+0#4040ff13&| @33|$+2#0000000&| |[|c@2|]| @1|$
 |~+0#4040ff13&| @33|b+2#0000000&|o|t@1|o|m| @3
-|:+0&&|s|e|t| |t|a|b|p|a|n|e|l|o|p|t|+|=|a|l|i|g|n|:|r|i|g|h|t| @15
+| +0&&@34| +1&&@9
diff --git a/src/testdir/dumps/Test_tabpanel_many_tabpages_0.dump 
b/src/testdir/dumps/Test_tabpanel_many_tabpages_0.dump
index d5a0e4a00..8188e27b9 100644
--- a/src/testdir/dumps/Test_tabpanel_many_tabpages_0.dump
+++ b/src/testdir/dumps/Test_tabpanel_many_tabpages_0.dump
@@ -7,4 +7,4 @@
 |7+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33
 |8+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33
 |9+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33
-| +0#0000000&@26|0|,|0|-|1| @8|A|l@1| 
+|1+8#0000001#e0e0e08|0|:|t|a|b| @3| +0#0000000#ffffff0@17|0|,|0|-|1| @7|A|l@1| 
diff --git a/src/testdir/dumps/Test_tabpanel_many_tabpages_1.dump 
b/src/testdir/dumps/Test_tabpanel_many_tabpages_1.dump
index d946a3190..f56777d0b 100644
--- a/src/testdir/dumps/Test_tabpanel_many_tabpages_1.dump
+++ b/src/testdir/dumps/Test_tabpanel_many_tabpages_1.dump
@@ -7,4 +7,4 @@
 |7+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33
 |8+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33
 |9+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33
-| +0#0000000&@26|0|,|0|-|1| @8|A|l@1| 
+|1+8#0000001#e0e0e08|0|:|t|a|b| @3| +0#0000000#ffffff0@17|0|,|0|-|1| @7|A|l@1| 
diff --git a/src/testdir/dumps/Test_tabpanel_many_tabpages_2.dump 
b/src/testdir/dumps/Test_tabpanel_many_tabpages_2.dump
index 74b2b7b4e..03f40f664 100644
--- a/src/testdir/dumps/Test_tabpanel_many_tabpages_2.dump
+++ b/src/testdir/dumps/Test_tabpanel_many_tabpages_2.dump
@@ -7,4 +7,4 @@
 |7+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33
 |8+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33
 |9+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33
-| +0#0000000&@26|0|,|0|-|1| @8|A|l@1| 
+|1+8#0000001#e0e0e08|0|:|t|a|b| @3| +0#0000000#ffffff0@17|0|,|0|-|1| @7|A|l@1| 
diff --git a/src/testdir/dumps/Test_tabpanel_many_tabpages_3.dump 
b/src/testdir/dumps/Test_tabpanel_many_tabpages_3.dump
index 037a53a32..4c61f789f 100644
--- a/src/testdir/dumps/Test_tabpanel_many_tabpages_3.dump
+++ b/src/testdir/dumps/Test_tabpanel_many_tabpages_3.dump
@@ -7,4 +7,4 @@
 |7+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33
 |8+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33
 |9+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33
-| +0#0000000&@26|0|,|0|-|1| @8|A|l@1| 
+|1+8#0000001#e0e0e08|0|:|t|a|b| @3| +0#0000000#ffffff0@17|0|,|0|-|1| @7|A|l@1| 
diff --git a/src/testdir/dumps/Test_tabpanel_many_tabpages_4.dump 
b/src/testdir/dumps/Test_tabpanel_many_tabpages_4.dump
index 70905a6b9..aa1ae3e18 100644
--- a/src/testdir/dumps/Test_tabpanel_many_tabpages_4.dump
+++ b/src/testdir/dumps/Test_tabpanel_many_tabpages_4.dump
@@ -1,5 +1,4 @@
-|1+8#0000001#e0e0e08|0|:|t|a|b| @3> +0#0000000#ffffff0@34
-|1+2&&@1|:|t|a|b| @3|~+0#4040ff13&| @33
+|1+2&#ffffff0@1|:|t|a|b| @3> +0&&@34
 |1+8#0000001#e0e0e08|2|:|t|a|b| @3|~+0#4040ff13#ffffff0| @33
 |1+8#0000001#e0e0e08|3|:|t|a|b| @3|~+0#4040ff13#ffffff0| @33
 |1+8#0000001#e0e0e08|4|:|t|a|b| @3|~+0#4040ff13#ffffff0| @33
@@ -7,4 +6,5 @@
 |1+8#0000001#e0e0e08|6|:|t|a|b| @3|~+0#4040ff13#ffffff0| @33
 |1+8#0000001#e0e0e08|7|:|t|a|b| @3|~+0#4040ff13#ffffff0| @33
 |1+8#0000001#e0e0e08|8|:|t|a|b| @3|~+0#4040ff13#ffffff0| @33
-|:+0#0000000&|t|a|b|n|e|x|t| |-|3| @15|0|,|0|-|1| @8|A|l@1| 
+|1+8#0000001#e0e0e08|9|:|t|a|b| @3|~+0#4040ff13#ffffff0| @33
+|2+8#0000001#e0e0e08|0|:|t|a|b| @3|:+0#0000000#ffffff0|t|a|b|n|e|x|t| |-|3| 
@6|0|,|0|-|1| @7|A|l@1| 
diff --git 
a/src/testdir/dumps/Test_tabpanel_noeval_tabpanel_statusline_tabline_0.dump 
b/src/testdir/dumps/Test_tabpanel_noeval_tabpanel_statusline_tabline_0.dump
index dd930c451..a8df2d1f1 100644
--- a/src/testdir/dumps/Test_tabpanel_noeval_tabpanel_statusline_tabline_0.dump
+++ b/src/testdir/dumps/Test_tabpanel_noeval_tabpanel_statusline_tabline_0.dump
@@ -7,4 +7,4 @@
 | +1#0000000&@8|||~+0#4040ff13&| @33
 | +1#0000000&@8|||~+0#4040ff13&| @33
 | +1#0000000&@8|||$+3&&| @13|[|c@2|]| @13|$
-|"+0&&|c@2|"| |[|N|e|w|]| @33
+| +1&&@8|||"+0&&|c@2|"| |[|N|e|w|]| @23
diff --git 
a/src/testdir/dumps/Test_tabpanel_noeval_tabpanel_statusline_tabline_1.dump 
b/src/testdir/dumps/Test_tabpanel_noeval_tabpanel_statusline_tabline_1.dump
index 21bb63b84..7285afbee 100644
--- a/src/testdir/dumps/Test_tabpanel_noeval_tabpanel_statusline_tabline_1.dump
+++ b/src/testdir/dumps/Test_tabpanel_noeval_tabpanel_statusline_tabline_1.dump
@@ -7,4 +7,4 @@
 |~+0#4040ff13&| @33||+1#0000000&| @8
 |~+0#4040ff13&| @33||+1#0000000&| @8
 |$+3&&| @13|[|c@2|]| @13|$||+1&&| @8
-|:+0&&|s|e|t| |t|a|b|p|a|n|e|l|o|p|t|+|=|a|l|i|g|n|:|r|i|g|h|t| @15
+| +0&&@34||+1&&| @8
diff --git a/src/testdir/dumps/Test_tabpanel_only_0.dump 
b/src/testdir/dumps/Test_tabpanel_only_0.dump
index b0e0bbe89..49367a67c 100644
--- a/src/testdir/dumps/Test_tabpanel_only_0.dump
+++ b/src/testdir/dumps/Test_tabpanel_only_0.dump
@@ -7,4 +7,4 @@
 | +1&&@19|a+0&&|s|d|f| @24||+1&&|a+0&&|s|d|f| @23
 | +1&&@19|a+0&&|s|d>f| @24||+1&&|a+0&&|s|d|f| @23
 | +1&&@19|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @1|1|0|1|,|4| @5|B|o|t| |<+1&&|N|o| 
|N|a|m|e|]| |[|+|]| |1|0|1|,|4| @5|B|o|t
-| +0&&@77
+| @19| +0&&@57
diff --git a/src/testdir/dumps/Test_tabpanel_only_1.dump 
b/src/testdir/dumps/Test_tabpanel_only_1.dump
index 8cbd93b6c..b3d942737 100644
--- a/src/testdir/dumps/Test_tabpanel_only_1.dump
+++ b/src/testdir/dumps/Test_tabpanel_only_1.dump
@@ -7,4 +7,4 @@
 |a|s|d|f| @34||+1&&|a+0&&|s|d|f| @33
 |a|s|d>f| @34||+1&&|a+0&&|s|d|f| @33
 |[+3&&|N|o| |N|a|m|e|]| |[|+|]| @7|1|0|1|,|4| @9|B|o|t| |[+1&&|N|o| 
|N|a|m|e|]| |[|+|]| @6|1|0|1|,|4| @9|B|o|t
-|:+0&&|t|a|b|o|n|l|y| @69
+| +0&&@77
diff --git a/src/testdir/dumps/Test_tabpanel_quitall_0.dump 
b/src/testdir/dumps/Test_tabpanel_quitall_0.dump
index 7399ca1a7..debe26716 100644
--- a/src/testdir/dumps/Test_tabpanel_quitall_0.dump
+++ b/src/testdir/dumps/Test_tabpanel_quitall_0.dump
@@ -7,4 +7,4 @@
 | +1#0000000&@19|~+0#4040ff13&| @23
 | +1#0000000&@19|~+0#4040ff13&| @23
 | +1#0000000&@19|<+3&&|o| |N|a|m|e|]| |[|+|]| |1|,|1| @5|A|l@1
-| +0&&@44
+| +1&&@19| +0&&@24
diff --git a/src/testdir/dumps/Test_tabpanel_ruler_0.dump 
b/src/testdir/dumps/Test_tabpanel_ruler_0.dump
index d1e2d7594..bba6816e8 100644
--- a/src/testdir/dumps/Test_tabpanel_ruler_0.dump
+++ b/src/testdir/dumps/Test_tabpanel_ruler_0.dump
@@ -7,4 +7,4 @@
 | +1#0000000&@19|~+0#4040ff13&| @23
 | +1#0000000&@19|~+0#4040ff13&| @23
 | +1#0000000&@19|~+0#4040ff13&| @23
-| +0#0000000&@26|0|,|0|-|1| @8|A|l@1| 
+| +1#0000000&@19| +0&&@12|0|,|0|-|1| @2|A|l@1| 
diff --git a/src/testdir/dumps/Test_tabpanel_stpl_eq_0_2.dump 
b/src/testdir/dumps/Test_tabpanel_stpl_eq_0_2.dump
index 4fe5c9327..e57ecb053 100644
--- a/src/testdir/dumps/Test_tabpanel_stpl_eq_0_2.dump
+++ b/src/testdir/dumps/Test_tabpanel_stpl_eq_0_2.dump
@@ -7,4 +7,4 @@
 | +1#0000000&@19|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| 
@16||+1#0000000&|~+0#4040ff13&| @16
 | +1#0000000&@19|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| 
@16||+1#0000000&|~+0#4040ff13&| @16
 | +1#0000000&@19|b+3&&@2| @17|a+1&&@2| @15|[|N|o| |N|a|m|e|]| |[|+|]| @4
-| +0&&@77
+@20| +0&&@57
diff --git a/src/testdir/dumps/Test_tabpanel_stpl_eq_1_1.dump 
b/src/testdir/dumps/Test_tabpanel_stpl_eq_1_1.dump
index ac616493b..f57c86632 100644
--- a/src/testdir/dumps/Test_tabpanel_stpl_eq_1_1.dump
+++ b/src/testdir/dumps/Test_tabpanel_stpl_eq_1_1.dump
@@ -7,4 +7,4 @@
 | +1#0000000&@19|~+0#4040ff13&| @56
 | +1#0000000&@19|~+0#4040ff13&| @56
 | +1#0000000&@19|~+0#4040ff13&| @56
-| +0#0000000&@77
+| +1#0000000&@19| +0&&@57
diff --git a/src/testdir/dumps/Test_tabpanel_stpl_eq_1_2.dump 
b/src/testdir/dumps/Test_tabpanel_stpl_eq_1_2.dump
index 619903666..bead88d76 100644
--- a/src/testdir/dumps/Test_tabpanel_stpl_eq_1_2.dump
+++ b/src/testdir/dumps/Test_tabpanel_stpl_eq_1_2.dump
@@ -7,4 +7,4 @@
 | +1#0000000&@19|~+0#4040ff13&| @27||+1#0000000&|~+0#4040ff13&| @26
 | +1#0000000&@19|~+0#4040ff13&| @27||+1#0000000&|~+0#4040ff13&| @26
 | +1#0000000&@19|[+3&&|N|o| |N|a|m|e|]| @20|[+1&&|N|o| |N|a|m|e|]| @18
-| +0&&@77
+@20| +0&&@57
diff --git a/src/testdir/dumps/Test_tabpanel_stpl_eq_1_3.dump 
b/src/testdir/dumps/Test_tabpanel_stpl_eq_1_3.dump
index 6311208a2..072ff9d3d 100644
--- a/src/testdir/dumps/Test_tabpanel_stpl_eq_1_3.dump
+++ b/src/testdir/dumps/Test_tabpanel_stpl_eq_1_3.dump
@@ -7,4 +7,4 @@
 |~+0#4040ff13&| @56| +1#0000000&@19
 |~+0#4040ff13&| @56| +1#0000000&@19
 |~+0#4040ff13&| @56| +1#0000000&@19
-| +0&&@77
+| +0&&@57| +1&&@19
diff --git a/src/testdir/dumps/Test_tabpanel_stpl_eq_1_4.dump 
b/src/testdir/dumps/Test_tabpanel_stpl_eq_1_4.dump
index 3c882693c..6900d6d1e 100644
--- a/src/testdir/dumps/Test_tabpanel_stpl_eq_1_4.dump
+++ b/src/testdir/dumps/Test_tabpanel_stpl_eq_1_4.dump
@@ -7,4 +7,4 @@
 |~+0#4040ff13&| @27||+1#0000000&|~+0#4040ff13&| @26| +1#0000000&@19
 |~+0#4040ff13&| @27||+1#0000000&|~+0#4040ff13&| @26| +1#0000000&@19
 |[+3&&|N|o| |N|a|m|e|]| @20|[+1&&|N|o| |N|a|m|e|]| @38
-| +0&&@77
+| +0&&@57| +1&&@19
diff --git a/src/testdir/dumps/Test_tabpanel_tabline_and_tabpanel_0.dump 
b/src/testdir/dumps/Test_tabpanel_tabline_and_tabpanel_0.dump
index 14400e598..beabbcc1d 100644
--- a/src/testdir/dumps/Test_tabpanel_tabline_and_tabpanel_0.dump
+++ b/src/testdir/dumps/Test_tabpanel_tabline_and_tabpanel_0.dump
@@ -6,5 +6,5 @@
 | +1#0000000&@8|│|~+0#4040ff13&| @33
 | +1#0000000&@8|│|~+0#4040ff13&| @33
 | +1#0000000&@8|│|~+0#4040ff13&| @33
-| +1#0000000&@8|│|~+0#4040ff13&| @33
-|"+0#0000000&|c@2|.|t|x|t|"| |[|N|e|w|]| @11|0|,|0|-|1| @8|A|l@1| 
+| +1#0000000&@8|│|c+3&&@2|.|t|x|t| @10|0|,|0|-|1| @8|A|l@1
+| +1&&@8|│|"+0&&|c@2|.|t|x|t|"| |[|N|e|w|]| @19
diff --git a/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_0.dump 
b/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_0.dump
index 284e23ab3..993d99001 100644
--- a/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_0.dump
+++ b/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_0.dump
@@ -7,4 +7,4 @@
 | +1#0000000&@8|│|~+0#4040ff13&| @33
 | +1#0000000&@8|│|~+0#4040ff13&| @33
 | +1#0000000&@8|│|~+0#4040ff13&| @33
-| +0#0000000&@26|0|,|0|-|1| @8|A|l@1| 
+| +1#0000000&@8|│| +0&&@17|0|,|0|-|1| @7|A|l@1| 
diff --git a/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_1.dump 
b/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_1.dump
index d3fec7301..af420ab36 100644
--- a/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_1.dump
+++ b/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_1.dump
@@ -7,4 +7,4 @@
 |│+1#0000000&|~+0#4040ff13&| @42
 |│+1#0000000&|~+0#4040ff13&| @42
 |│+1#0000000&|~+0#4040ff13&| @42
-|:+0#0000000&|s|e|t| |t|a|b|p|a|n|e|l|o|p|t|=|c|o|l|u|m|n|s|:|1|,|0|,|0|-|1| 
@8|A|l@1| 
+|│+1#0000000&| +0&&@21|0|,|0|-|1| @12|A|l@1| 
diff --git a/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_2.dump 
b/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_2.dump
index fc0b17abb..993d99001 100644
--- a/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_2.dump
+++ b/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_2.dump
@@ -7,4 +7,4 @@
 | +1#0000000&@8|│|~+0#4040ff13&| @33
 | +1#0000000&@8|│|~+0#4040ff13&| @33
 | +1#0000000&@8|│|~+0#4040ff13&| @33
-|:+0#0000000&|s|e|t| |t|a|b|p|a|n|e|l|o|p|t|=|c|o|l|u|m|n|s|:|1|0@1|,|0|-|1| 
@8|A|l@1| 
+| +1#0000000&@8|│| +0&&@17|0|,|0|-|1| @7|A|l@1| 
diff --git a/src/testdir/dumps/Test_tabpanel_visual_0.dump 
b/src/testdir/dumps/Test_tabpanel_visual_0.dump
index 14d50afd9..421a5f31d 100644
--- a/src/testdir/dumps/Test_tabpanel_visual_0.dump
+++ b/src/testdir/dumps/Test_tabpanel_visual_0.dump
@@ -6,5 +6,5 @@
 | +1#0000000&@9|~+0#4040ff13&| @33
 | +1#0000000&@9|~+0#4040ff13&| @33
 | +1#0000000&@9|~+0#4040ff13&| @33
-| +1#0000000&@9|~+0#4040ff13&| @33
-|-+2#0000000&@1| |V|I|S|U|A|L| |-@1| +0&&@4|1@1| @7|1|,|1@1| @9|A|l@1| 
+| +1#0000000&@9|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @4|1|,|1@1| @9|A|l@1
+| +1&&@9|-+2&&@1| |V|I|S|U|A|L| |-@1| +0&&@11|1@1| @8
diff --git a/src/testdir/dumps/Test_tabpanel_visual_1.dump 
b/src/testdir/dumps/Test_tabpanel_visual_1.dump
index 5d4a66080..b96c0aca2 100644
--- a/src/testdir/dumps/Test_tabpanel_visual_1.dump
+++ b/src/testdir/dumps/Test_tabpanel_visual_1.dump
@@ -6,5 +6,5 @@
 | +1#0000000&@9|~+0#4040ff13&| @33
 | +1#0000000&@9|~+0#4040ff13&| @33
 | +1#0000000&@9|~+0#4040ff13&| @33
-| +1#0000000&@9|~+0#4040ff13&| @33
-|-+2#0000000&@1| |V|I|S|U|A|L| |-@1| +0&&@4|9| @8|2|,|1|4| @9|A|l@1| 
+| +1#0000000&@9|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @4|2|,|1|4| @9|A|l@1
+| +1&&@9|-+2&&@1| |V|I|S|U|A|L| |-@1| +0&&@11|9| @9
diff --git a/src/testdir/dumps/Test_tabpanel_visual_2.dump 
b/src/testdir/dumps/Test_tabpanel_visual_2.dump
index c80068427..669881731 100644
--- a/src/testdir/dumps/Test_tabpanel_visual_2.dump
+++ b/src/testdir/dumps/Test_tabpanel_visual_2.dump
@@ -6,5 +6,5 @@
 | +1#0000000&@9|~+0#4040ff13&| @33
 | +1#0000000&@9|~+0#4040ff13&| @33
 | +1#0000000&@9|~+0#4040ff13&| @33
-| +1#0000000&@9|~+0#4040ff13&| @33
-|b+0#0000000&@2|2| |c@2|2| @17|2|,|6| @10|A|l@1| 
+| +1#0000000&@9|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @4|2|,|6| @10|A|l@1
+| +1&&@9|b+0&&@2|2| |c@2|2| @25
diff --git a/src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_0.dump 
b/src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_0.dump
index e665e2536..135d06dd8 100644
--- a/src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_0.dump
+++ b/src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_0.dump
@@ -7,4 +7,4 @@
 | +1#0000000&@19|~+0#4040ff13&| @23
 | +1#0000000&@19|~+0#4040ff13&| @23
 | +1#0000000&@19|~+0#4040ff13&| @23
-| +0#0000000&@44
+| +1#0000000&@19| +0&&@24
diff --git a/src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_1.dump 
b/src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_1.dump
index 4b61a682d..5c9926c2a 100644
--- a/src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_1.dump
+++ b/src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_1.dump
@@ -6,5 +6,5 @@
 | +1#0000000&@19|~+0#4040ff13&| @23
 | +1#0000000&@19|~+0#4040ff13&| @23
 | +1#0000000&@19|~+0#4040ff13&| @23
-|t+0#0000001#ffff4012|a|b|n|e|w| +3#0000000#ffffff0@1|t|a|b|n|e|x|t| @29
-|:+0&&|t|a|b|n|e|w> @37
+| +1#0000000&@19|t+0#0000001#ffff4012|a|b|n|e|w| 
+3#0000000#ffffff0@1|t|a|b|n|e|x|t| @9
+| +1&&@19|:+0&&|t|a|b|n|e|w> @17
diff --git a/src/testdir/dumps/Test_tabpanel_with_cmdline_pum_0.dump 
b/src/testdir/dumps/Test_tabpanel_with_cmdline_pum_0.dump
index e665e2536..135d06dd8 100644
--- a/src/testdir/dumps/Test_tabpanel_with_cmdline_pum_0.dump
+++ b/src/testdir/dumps/Test_tabpanel_with_cmdline_pum_0.dump
@@ -7,4 +7,4 @@
 | +1#0000000&@19|~+0#4040ff13&| @23
 | +1#0000000&@19|~+0#4040ff13&| @23
 | +1#0000000&@19|~+0#4040ff13&| @23
-| +0#0000000&@44
+| +1#0000000&@19| +0&&@24
diff --git a/src/testdir/dumps/Test_tabpanel_with_cmdline_pum_1.dump 
b/src/testdir/dumps/Test_tabpanel_with_cmdline_pum_1.dump
index 0e60b9cad..7682fa829 100644
--- a/src/testdir/dumps/Test_tabpanel_with_cmdline_pum_1.dump
+++ b/src/testdir/dumps/Test_tabpanel_with_cmdline_pum_1.dump
@@ -3,8 +3,8 @@
 |b+2&&@2| @16|~+0#4040ff13&| @23
 | +1#0000000&@19|~+0#4040ff13&| @23
 | +1#0000000&@19|~+0#4040ff13&| @23
-| +0#0000001#e0e0e08|s|e|t| @11| +1#0000000#ffffff0@3|~+0#4040ff13&| @23
-| +0#0000001#ffd7ff255|s|e|t|f|i|l|e|t|y|p|e| @3| 
+1#0000000#ffffff0@3|~+0#4040ff13&| @23
-| +0#0000001#ffd7ff255|s|e|t|g|l|o|b|a|l| @5| 
+1#0000000#ffffff0@3|~+0#4040ff13&| @23
-| +0#0000001#ffd7ff255|s|e|t|l|o|c|a|l| @6| 
+1#0000000#ffffff0@3|~+0#4040ff13&| @23
-|:+0#0000000&|s|e|t> @40
+| +1#0000000&@19| +0#0000001#e0e0e08|s|e|t| @11| +0#4040ff13#ffffff0@8
+| +1#0000000&@19| +0#0000001#ffd7ff255|s|e|t|f|i|l|e|t|y|p|e| @3| 
+0#4040ff13#ffffff0@8
+| +1#0000000&@19| +0#0000001#ffd7ff255|s|e|t|g|l|o|b|a|l| @5| 
+0#4040ff13#ffffff0@8
+| +1#0000000&@19| +0#0000001#ffd7ff255|s|e|t|l|o|c|a|l| @6| 
+0#4040ff13#ffffff0@8
+| +1#0000000&@19|:+0&&|s|e|t> @20
diff --git a/src/testdir/dumps/Test_tabpanel_with_msg_scrolled_0.dump 
b/src/testdir/dumps/Test_tabpanel_with_msg_scrolled_0.dump
index cd65a0a26..709093625 100644
--- a/src/testdir/dumps/Test_tabpanel_with_msg_scrolled_0.dump
+++ b/src/testdir/dumps/Test_tabpanel_with_msg_scrolled_0.dump
@@ -7,4 +7,4 @@
 | +1#0000000&@19|~+0#4040ff13&| @23
 | +1#0000000&@19|~+0#4040ff13&| @23
 | +1#0000000&@19|~+0#4040ff13&| @23
-| +0#0000000&@44
+| +1#0000000&@19| +0&&@24
diff --git a/src/testdir/dumps/Test_tabpanel_with_msg_scrolled_1.dump 
b/src/testdir/dumps/Test_tabpanel_with_msg_scrolled_1.dump
index d1da8d23e..cd5583d15 100644
--- a/src/testdir/dumps/Test_tabpanel_with_msg_scrolled_1.dump
+++ b/src/testdir/dumps/Test_tabpanel_with_msg_scrolled_1.dump
@@ -7,4 +7,4 @@
 | +1#0000000&@19|~+0#4040ff13&| @23
 | +1#0000000&@19|~+0#4040ff13&| @23
 | +1#0000000&@19|~+0#4040ff13&| @23
-| +0#0000000&@44
+| +1#0000000&@19| +0&&@24
diff --git a/src/testdir/dumps/Test_tabpanel_with_vsplit_0.dump 
b/src/testdir/dumps/Test_tabpanel_with_vsplit_0.dump
index 836e07b2a..7b0daf0b7 100644
--- a/src/testdir/dumps/Test_tabpanel_with_vsplit_0.dump
+++ b/src/testdir/dumps/Test_tabpanel_with_vsplit_0.dump
@@ -7,4 +7,4 @@
 | +1#0000000&@19|~+0#4040ff13&| @56
 | +1#0000000&@19|~+0#4040ff13&| @56
 | +1#0000000&@19|~+0#4040ff13&| @56
-| +0#0000000&@59|0|,|0|-|1| @8|A|l@1| 
+| +1#0000000&@19| +0&&@39|0|,|0|-|1| @8|A|l@1| 
diff --git a/src/testdir/dumps/Test_tabpanel_with_vsplit_1.dump 
b/src/testdir/dumps/Test_tabpanel_with_vsplit_1.dump
index 81653d784..7ea896af7 100644
--- a/src/testdir/dumps/Test_tabpanel_with_vsplit_1.dump
+++ b/src/testdir/dumps/Test_tabpanel_with_vsplit_1.dump
@@ -7,4 +7,4 @@
 | +1#0000000&@19|~+0#4040ff13&| @27||+1#0000000&|~+0#4040ff13&| @26
 | +1#0000000&@19|~+0#4040ff13&| @27||+1#0000000&|~+0#4040ff13&| @26
 | +1#0000000&@19|[+3&&|N|o| |N|a|m|e|]| @5|0|,|0|-|1| @5|A|l@1| |[+1&&|N|o| 
|N|a|m|e|]| @4|0|,|0|-|1| @5|A|l@1
-|:+0&&|v|s|p|l|i|t| @70
+| @19|:+0&&|v|s|p|l|i|t| @50
diff --git a/src/testdir/dumps/Test_tabpanel_with_vsplit_2.dump 
b/src/testdir/dumps/Test_tabpanel_with_vsplit_2.dump
index 82d335644..842ae8a78 100644
--- a/src/testdir/dumps/Test_tabpanel_with_vsplit_2.dump
+++ b/src/testdir/dumps/Test_tabpanel_with_vsplit_2.dump
@@ -7,4 +7,4 @@
 | +1#0000000&@19|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| 
@16||+1#0000000&|~+0#4040ff13&| @16
 | +1#0000000&@19|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| 
@16||+1#0000000&|~+0#4040ff13&| @16
 | +1#0000000&@19|<+3&&|N|o| |N|a|m|e|]| |0|,|0|-|1| @1|A|l@1| |<+1&&|o| 
|N|a|m|e|]| |0|,|0|-|1| |A|l@1| |<|o| |N|a|m|e|]| |0|,|0|-|1| |A|l@1
-|:+0&&|v|s|p|l|i|t| @70
+| @19|:+0&&|v|s|p|l|i|t| @50
diff --git a/src/testdir/dumps/Test_tabpanel_with_vsplit_3.dump 
b/src/testdir/dumps/Test_tabpanel_with_vsplit_3.dump
index 6e5f8e447..62c51f443 100644
--- a/src/testdir/dumps/Test_tabpanel_with_vsplit_3.dump
+++ b/src/testdir/dumps/Test_tabpanel_with_vsplit_3.dump
@@ -7,4 +7,4 @@
 |~+0#4040ff13&| @56||+1#0000000&| @18
 |~+0#4040ff13&| @56||+1#0000000&| @18
 |~+0#4040ff13&| @56||+1#0000000&| @18
-|:+0&&|s|e|t| |t|a|b|p|a|n|e|l|o|p|t|=|a|l|i|g|n|:|r|i|g|h|t|,|v|e|r|t| 
@26|0|,|0|-|1| @8|A|l@1| 
+| +0&&@39|0|,|0|-|1| @8|A|l@1| ||+1&&| @18
diff --git a/src/testdir/dumps/Test_tabpanel_with_vsplit_4.dump 
b/src/testdir/dumps/Test_tabpanel_with_vsplit_4.dump
index 797894361..131e3f38a 100644
--- a/src/testdir/dumps/Test_tabpanel_with_vsplit_4.dump
+++ b/src/testdir/dumps/Test_tabpanel_with_vsplit_4.dump
@@ -7,4 +7,4 @@
 |~+0#4040ff13&| @27||+1#0000000&|~+0#4040ff13&| @26||+1#0000000&| @18
 |~+0#4040ff13&| @27||+1#0000000&|~+0#4040ff13&| @26||+1#0000000&| @18
 |[+3&&|N|o| |N|a|m|e|]| @5|0|,|0|-|1| @5|A|l@1| |[+1&&|N|o| |N|a|m|e|]| 
@4|0|,|0|-|1| @5|A|l@1||| @18
-|:+0&&|v|s|p|l|i|t| @70
+|:+0&&|v|s|p|l|i|t| @50||+1&&| @18
diff --git a/src/testdir/dumps/Test_tabpanel_with_vsplit_5.dump 
b/src/testdir/dumps/Test_tabpanel_with_vsplit_5.dump
index 5744d130e..bd9183b19 100644
--- a/src/testdir/dumps/Test_tabpanel_with_vsplit_5.dump
+++ b/src/testdir/dumps/Test_tabpanel_with_vsplit_5.dump
@@ -7,4 +7,4 @@
 |~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| 
@16||+1#0000000&|~+0#4040ff13&| @16||+1#0000000&| @18
 |~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| 
@16||+1#0000000&|~+0#4040ff13&| @16||+1#0000000&| @18
 |<+3&&|N|o| |N|a|m|e|]| |0|,|0|-|1| @1|A|l@1| |<+1&&|o| |N|a|m|e|]| 
|0|,|0|-|1| |A|l@1| |<|o| |N|a|m|e|]| |0|,|0|-|1| |A|l@1||| @18
-|:+0&&|v|s|p|l|i|t| @70
+|:+0&&|v|s|p|l|i|t| @50||+1&&| @18
diff --git a/src/testdir/test_tabpanel.vim b/src/testdir/test_tabpanel.vim
index 65c736276..acf0ea94b 100644
--- a/src/testdir/test_tabpanel.vim
+++ b/src/testdir/test_tabpanel.vim
@@ -117,6 +117,9 @@ function Test_tabpanel_mouse()
   call test_setmouse(3, 1)
   call feedkeys("\<LeftMouse>", 'xt')
   call assert_equal(3, tabpagenr())
+  call test_setmouse(&lines, 1)
+  call feedkeys("\<LeftMouse>", 'xt')
+  call assert_equal(1, tabpagenr())
 
   " Drag the active tab page
   tablast
@@ -148,8 +151,8 @@ function Test_tabpanel_mouse()
   call assert_equal(3, tabpagenr())
 
   " Test getmousepos()
-  call feedkeys("\<LeftMouse>", 'xt')
   call test_setmouse(2, 3)
+  call feedkeys("\<LeftMouse>", 'xt')
   let pos = getmousepos()
   call assert_equal(0, pos['winid'])
   call assert_equal(0, pos['winrow'])
@@ -404,7 +407,7 @@ function Test_tabpanel_visual()
   let lines =<< trim END
     set showtabpanel=2
     set tabpanelopt=columns:10
-    set showtabline=0
+    set showtabline=0 laststatus=2
     tabnew
     call setbufline(bufnr(), 1, ['aaa1 bbb1 ccc1 ddd1', 'aaa2 bbb2 ccc2 ddd2', 
'aaa3 bbb3 ccc3 ddd3', 'aaa4 bbb4 ccc4 ddd4'])
   END
@@ -452,7 +455,7 @@ function Test_tabpanel_tabline_and_tabpanel()
     set showtabpanel=2
     set tabpanelopt=columns:10,vert
     set fillchars=tpl_vert:│
-    set showtabline=2
+    set showtabline=2 laststatus=2
     e aaa.txt
     tabnew
     e bbb.txt
diff --git a/src/version.c b/src/version.c
index f69be10d2..adf5f2268 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1898,
 /**/
     1897,
 /**/
@@ -4598,7 +4600,7 @@ version_msg_wrap(char_u *s, int wrap)
 {
     int                len = vim_strsize(s) + (wrap ? 2 : 0);
 
-    if (!got_int && len < (int)Columns && msg_col + len >= (int)Columns
+    if (!got_int && len < cmdline_width && msg_col + len >= cmdline_width
                                                                && *s != '
')
        msg_putchar('
');
     if (!got_int)
@@ -4656,7 +4658,7 @@ list_in_columns(char_u **items, int size, int current)
     }
     width += 1;
 
-    if (Columns < width)
+    if (cmdline_width < width)
     {
        // Not enough screen columns - show one per line
        for (i = 0; i < item_count; ++i)
@@ -4670,7 +4672,7 @@ list_in_columns(char_u **items, int size, int current)
 
     // The rightmost column doesn't need a separator.
     // Sacrifice it to fit in one more column if possible.
-    ncol = (int) (Columns + 1) / width;
+    ncol = (cmdline_width + 1) / width;
     nrow = item_count / ncol + ((item_count % ncol) ? 1 : 0);
 
     // "i" counts columns then rows.  "idx" counts rows then columns.
diff --git a/src/window.c b/src/window.c
index 17051c86f..7ff228280 100644
--- a/src/window.c
+++ b/src/window.c
@@ -6228,8 +6228,9 @@ shell_new_columns(void)
        return;
 
 #if defined(FEAT_TABPANEL)
-    int save_wincol = firstwin->w_wincol;
-    int save_fr_width = topframe->fr_width;
+    static int prev_tp_width;
+    static int prev_wincol;
+    static int prev_fr_width;
 #endif
     int w = COLUMNS_WITHOUT_TPL();
 
@@ -6242,12 +6243,26 @@ shell_new_columns(void)
     win_comp_pos();            // recompute w_winrow and w_wincol
 
 #if defined(FEAT_TABPANEL)
-    if (p_ea && firstwin->w_wincol + topframe->fr_width
-           == save_wincol + save_fr_width &&
-           (firstwin->w_wincol != save_wincol ||
-            topframe->fr_width != save_fr_width))
+    int tp_width = tabpanel_width();
+    int tp_width_changed = tp_width != prev_tp_width;
+    // tabpanel width changed
+    if (tp_width_changed && p_ea)
        win_equal(curwin, FALSE, 0);
+    // tabpanel layout changed
+    if (tp_width_changed
+           || (tp_width > 0 && (firstwin->w_wincol != prev_wincol
+                   || topframe->fr_width != prev_fr_width)))
+    {
+       screen_fill(cmdline_row, (int)Rows, 0, (int)Columns, ' ', ' ', 0);
+    }
+    prev_tp_width = tabpanel_width();
+    prev_wincol = firstwin->w_wincol;
+    prev_fr_width = topframe->fr_width;
 #endif
+    // Adjust offset for command line start column
+    cmdline_col_off = firstwin->w_wincol;
+    cmdline_width = topframe->fr_width;
+    comp_col();
     if (!skip_win_fix_scroll)
        win_fix_scroll(TRUE);
 

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1vJWOo-001D5W-7Y%40256bit.org.

Raspunde prin e-mail lui