aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/drawline.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-09-22 15:36:24 +0800
committerGitHub <noreply@github.com>2023-09-22 15:36:24 +0800
commit64e8a3c4d19eab40888fbac36b96e97bd9d68c42 (patch)
treed8292fcfe24ce5779a0f27ac1e006e251e3a3ea2 /src/nvim/drawline.c
parent34a786bc49598eeafef3fffcb0836d4557e51638 (diff)
downloadrneovim-64e8a3c4d19eab40888fbac36b96e97bd9d68c42.tar.gz
rneovim-64e8a3c4d19eab40888fbac36b96e97bd9d68c42.tar.bz2
rneovim-64e8a3c4d19eab40888fbac36b96e97bd9d68c42.zip
fix(ui): handle virtual text with multiple hl in more cases (#25304)
Diffstat (limited to 'src/nvim/drawline.c')
-rw-r--r--src/nvim/drawline.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c
index a5409dbc98..7d64d9fa3c 100644
--- a/src/nvim/drawline.c
+++ b/src/nvim/drawline.c
@@ -324,24 +324,6 @@ static void draw_virt_text(win_T *wp, buf_T *buf, int col_off, int *end_col, int
}
}
-/// Get the next chunk of a virtual text item.
-///
-/// @param[in] vt The virtual text item
-/// @param[in,out] pos Position in the virtual text item
-/// @param[in,out] attr Highlight attribute
-///
-/// @return The text of the chunk, or NULL if there are no more chunks
-static char *next_virt_text_chunk(VirtText vt, size_t *pos, int *attr)
-{
- char *text = NULL;
- for (; text == NULL && *pos < kv_size(vt); (*pos)++) {
- text = kv_A(vt, *pos).text;
- int hl_id = kv_A(vt, *pos).hl_id;
- *attr = hl_combine_attr(*attr, hl_id > 0 ? syn_id2attr(hl_id) : 0);
- }
- return text;
-}
-
static int draw_virt_text_item(buf_T *buf, int col, VirtText vt, HlMode hl_mode, int max_col,
int vcol, bool rl)
{