diff options
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r-- | src/nvim/screen.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 6e4c17f49e..6d25c4359b 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -3444,6 +3444,10 @@ win_line ( 1); // TODO: is passing p for start of the line OK? n_extra = win_lbr_chartabsize(wp, line, p, (colnr_T)vcol, NULL) - 1; + if (c == TAB && n_extra + col > wp->w_width) { + n_extra = (int)wp->w_buffer->b_p_ts + - vcol % (int)wp->w_buffer->b_p_ts - 1; + } c_extra = ' '; if (vim_iswhite(c)) { if (c == TAB) @@ -7791,7 +7795,7 @@ static void draw_tabline(void) if (room > 0) { /* Get buffer name in NameBuff[] */ get_trans_bufname(cwp->w_buffer); - shorten_dir(NameBuff); + (void)shorten_dir(NameBuff); len = vim_strsize(NameBuff); p = NameBuff; if (has_mbyte) |