summaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-07-01 20:24:40 +0100
committerBram Moolenaar <Bram@vim.org>2023-07-01 20:24:40 +0100
commitd392a74c5a8af8271a33a20d37ae1a8ea422cb4b (patch)
treec8b7a49ba8eef130f6a3af8e66f3d821f58c63b3 /src/buffer.c
parente7d9ca2b3bf99b0b759be8952e02c77110a354c1 (diff)
patch 9.0.1672: tabline highlight wrong after truncated double width labelv9.0.1672
Problem: Tabline highlight wrong after truncated double width label. Solution: Fill up half a double width character later. (closes #12614)
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 330b3b98f6..14eac92b97 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -502,7 +502,7 @@ can_unload_buffer(buf_T *buf)
* 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
@@ -5108,14 +5108,6 @@ build_stl_str_hl(
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++)
{
@@ -5124,6 +5116,14 @@ build_stl_str_hl(
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;
}