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
{
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;
}
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;
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
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)
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;
}
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)
{
}
}
- 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);
{
// 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;
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;
*previous = dp->result;
}
#endif
- if (msg_col > Columns - list_width)
+ if (msg_col > cmdline_width - list_width)
msg_putchar('\n');
if (msg_col)
while (msg_col % list_width != 0)
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;
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
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;
FALSE);
else
screen_char(LineOffset[k] + topframe->fr_width - 1, k,
- Columns - 1);
+ cmdline_width - 1);
}
#endif
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);
}
if (cmd_buf == NULL)
goto filterend;
- windgoto((int)Rows - 1, 0);
+ windgoto((int)Rows - 1, cmdline_col_off);
cursor_on();
/*
// This windgoto is required for when the '\n' 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;
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
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('\n');
out_flush();
stoptermcap();
{
#ifdef FEAT_RIGHTLEFT
if (cmdmsg_rl)
- msg_col = Columns;
+ msg_col = cmdline_width;
else
#endif
msg_col = 0;
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)
{
goto cmdline_changed;
if (!cmd_silent)
{
- windgoto(msg_row, 0);
+ windgoto(msg_row, cmdline_col_off);
out_flush();
}
break;
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)
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
{
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++;
}
}
}
msg_clr_eos();
- windgoto(msg_row, msg_col);
+ windgoto(msg_row, cmdline_col_off + msg_col);
continue;
}
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
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;
msg_col -= i;
if (msg_col < 0)
{
- msg_col += Columns;
+ msg_col += cmdline_width;
--msg_row;
}
}
}
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
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;
// 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;
}
#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();
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);
}
/*
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;
* 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
name_col = msg_col;
endcol = 15;
}
- else if (msg_col + outlen + 1 >= Columns)
+ else if (msg_col + outlen + 1 >= cmdline_width)
{
msg_putchar('\n');
if (got_int)
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(' ');
(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('\n');
msg_advance(12);
msg_outtrans_long_attr((char_u *)buf, 0);
#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");
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;
#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)
// 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)
{
c = K_IGNORE;
msg_col =
#ifdef FEAT_RIGHTLEFT
- cmdmsg_rl ? Columns - 1 :
+ cmdmsg_rl ? cmdline_width - 1 :
#endif
0;
}
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()
msg_row = cmdline_row;
msg_col =
#ifdef FEAT_RIGHTLEFT
- cmdmsg_rl ? Columns - 1 :
+ cmdmsg_rl ? cmdline_width - 1 :
#endif
0;
}
#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;
}
}
#endif
{
msg_col += cw;
- if (msg_col >= Columns)
+ if (msg_col >= cmdline_width)
{
msg_col = 0;
++msg_row;
int slen = len;
int room;
- room = Columns - msg_col;
+ room = cmdline_width - msg_col;
if (len > room && room >= 20)
{
slen = (room - 3) / 2;
|| (has_mbyte && (*mb_ptr2cells)(s) > 1 && msg_col <= 2))
:
#endif
- ((*s != '\r' && msg_col + t_col >= Columns - 1)
- || (*s == TAB && msg_col + t_col >= ((Columns - 1) & ~7))
+ ((*s != '\r' && 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
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 >= ' '
}
wrap = *s == '\n'
- || 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 == '\r' || *s == '\b'
|| *s == '\t' || *s == BELL))
{
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;
# 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;
// 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.
// 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)
{
// 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;
if (cmdmsg_rl)
{
if (*s == CAR || *s == NL)
- msg_col = Columns - 1;
+ msg_col = cmdline_width - 1;
else
--msg_col;
}
// 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;
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;
}
}
// 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)
}
#ifdef FEAT_RIGHTLEFT
else if (cmdmsg_rl)
- msg_col = Columns - 1;
+ msg_col = cmdline_width - 1;
#endif
entered = FALSE;
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;
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);
}
/*
#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)
{
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;
}
#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);
}
}
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
++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))
{
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"
// 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;
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
{
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
}
}
else
msg_outtrans_len(ta_buf + i, 1);
}
- windgoto(msg_row, msg_col);
+ windgoto(msg_row, cmdline_col_off + msg_col);
out_flush();
}
msg_puts((char *)buffer);
}
- windgoto(msg_row, msg_col);
+ windgoto(msg_row, cmdline_col_off + msg_col);
cursor_on();
out_flush();
if (got_int)
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\n"),
msg_puts((char *)buffer);
}
- windgoto(msg_row, msg_col);
+ windgoto(msg_row, cmdline_col_off + msg_col);
cursor_on();
out_flush();
}
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;
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)
{
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;
if (in_status_line)
col += wp->w_wincol;
+ else
+ col += cmdline_col_off;
}
if (maxwidth <= 0)
p = tabtab[n].start;
fillchar = tabtab[n].userhl;
}
- while (col < Columns)
+ while (col < firstwin->w_wincol + topframe->fr_width)
TabPageIdxs[col++] = fillchar;
}
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
}
}
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();
{
// 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)
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)
// 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;
}
// 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.
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)
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);
}
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);
}
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;
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
attr = HL_ATTR(HLF_CM);
while (*p && *p != '\r' && *p != '\n')
{
- if (msg_col + ptr2cells(p) >= Columns)
+ if (msg_col + ptr2cells(p) >= cmdline_width)
{
msg_putchar('\n');
if (got_int)
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('\n');
if (got_int)
break;
| +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
| +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
| +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|
| +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|
| +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
| +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
| +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|
| +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|
|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
|~+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|]
|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
|~+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
| +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|
|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|
| +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
| +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
| +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
| +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
| +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
| +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
| +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
| +1&&@19|.+0&&@24
| +1&&@19|.+0&&@24
| +1&&@19|.+0&&@24
-| @44
+| +1&&@19| +0&&@24
|.+0&&@24| +1&&@19
|.+0&&@24| +1&&@19
|.+0&&@24| +1&&@19
-| +0&&@44
+| +0&&@24| +1&&@19
| +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
| +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
| +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
| +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
| +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
|~+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
|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
|~+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
|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|
|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|
|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|
|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|
-|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
|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|
| +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
|~+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
| +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
|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
| +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
| +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|
| +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
| +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
| +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
|~+0#4040ff13&| @56| +1#0000000&@19
|~+0#4040ff13&| @56| +1#0000000&@19
|~+0#4040ff13&| @56| +1#0000000&@19
-| +0&&@77
+| +0&&@57| +1&&@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|]| @38
-| +0&&@77
+| +0&&@57| +1&&@19
| +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
| +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|
|│+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|
| +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|
| +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
| +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
| +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
| +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
| +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
| +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
|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
| +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
| +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
| +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|
| +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
| +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
|~+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
|~+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
|~+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
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
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'])
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
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
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1898,
/**/
1897,
/**/
{
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 != '\n')
msg_putchar('\n');
if (!got_int)
}
width += 1;
- if (Columns < width)
+ if (cmdline_width < width)
{
// Not enough screen columns - show one per line
for (i = 0; i < item_count; ++i)
// 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.
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();
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);