* It can be:
* 0 buffer becomes hidden
* DOBUF_UNLOAD buffer is unloaded
- * DOBUF_DELETE buffer is unloaded and removed from buffer list
+ * DOBUF_DEL buffer is unloaded and removed from buffer list
* DOBUF_WIPE buffer is unloaded and really deleted
* DOBUF_WIPE_REUSE idem, and add to buf_reuse list
* When doing all but the first one on the current buffer, the caller should
STRMOVE(s + 1, p);
*s = '<';
- // Fill up for half a double-wide character.
- while (++width < maxwidth)
- {
- s = s + STRLEN(s);
- MB_CHAR2BYTES(fillchar, s);
- *s = NUL;
- }
-
--n; // count the '<'
for (; l < itemcnt; l++)
{
else
stl_items[l].stl_start = s;
}
+
+ // Fill up for half a double-wide character.
+ while (++width < maxwidth)
+ {
+ s = s + STRLEN(s);
+ MB_CHAR2BYTES(fillchar, s);
+ *s = NUL;
+ }
}
width = maxwidth;
}
tabnew
redraw!
- tabclose
+ bw!
set tabline=
endfunc
call StopVimInTerminal(buf)
endfunc
+func TruncTabLine()
+ return '%1T口口%2Ta' .. repeat('b', &columns - 4) .. '%999X%#TabLine#c'
+endfunc
+
+" Test 'tabline' with truncated double-width label at the start.
+func Test_tabline_truncated_double_width()
+ tabnew
+ redraw
+ call assert_match('X$', Screenline(1))
+ let attr_TabLineFill = screenattr(1, &columns - 1)
+ let attr_TabLine = screenattr(1, &columns)
+ call assert_notequal(attr_TabLine, attr_TabLineFill)
+
+ set tabline=%!TruncTabLine()
+ redraw
+ call assert_equal('<a' .. repeat('b', &columns - 4) .. 'c', Screenline(1))
+ call assert_equal(attr_TabLineFill, screenattr(1, &columns - 2))
+ call assert_equal(attr_TabLine, screenattr(1, &columns - 1))
+ call assert_equal(attr_TabLine, screenattr(1, &columns))
+
+ bw!
+ set tabline=
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab