aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/highlight_group.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/highlight_group.c')
-rw-r--r--src/nvim/highlight_group.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/nvim/highlight_group.c b/src/nvim/highlight_group.c
index 96b55b5abb..38af2a708a 100644
--- a/src/nvim/highlight_group.c
+++ b/src/nvim/highlight_group.c
@@ -1536,8 +1536,12 @@ static bool hlgroup2dict(Dictionary *hl, NS ns_id, int hl_id, Arena *arena)
PUT_C(*hl, "link", STRING_OBJ(cstr_as_string(hl_table[link - 1].sg_name)));
} else {
*hl = arena_dict(arena, HLATTRS_DICT_SIZE);
- hlattrs2dict(hl, attr, true, true);
- hlattrs2dict(hl, attr, false, true);
+ Dictionary hl_cterm = arena_dict(arena, HLATTRS_DICT_SIZE);
+ hlattrs2dict(hl, NULL, attr, true, true);
+ hlattrs2dict(hl, &hl_cterm, attr, false, true);
+ if (kv_size(hl_cterm)) {
+ PUT_C(*hl, "cterm", DICTIONARY_OBJ(hl_cterm));
+ }
}
return true;
}