fix(decorations): fix imbalanced sign count

This commit is contained in:
bfredl
2023-11-22 11:30:36 +01:00
parent 2e722da44d
commit fba17d5b88
2 changed files with 31 additions and 4 deletions

View File

@@ -179,11 +179,17 @@ DecorSignHighlight decor_sh_from_inline(DecorHighlightInline item, String concea
void buf_put_decor(buf_T *buf, DecorInline decor, int row)
{
if (decor.ext) {
if (decor.data.ext.vt) {
buf_put_decor_virt(buf, decor.data.ext.vt);
DecorVirtText *vt = decor.data.ext.vt;
while (vt) {
buf_put_decor_virt(buf, vt);
vt = vt->next;
}
if (decor.data.ext.sh_idx != DECOR_ID_INVALID) {
buf_put_decor_sh(buf, &kv_A(decor_items, decor.data.ext.sh_idx), row);
uint32_t idx = decor.data.ext.sh_idx;
while (idx != DECOR_ID_INVALID) {
DecorSignHighlight *sh = &kv_A(decor_items, idx);
buf_put_decor_sh(buf, sh, row);
idx = sh->next;
}
}
}