diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-03-23 12:44:05 +0100 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2023-03-23 13:42:00 +0100 |
commit | 6d267ad30cf539f520b46e3c92939f7031ce116f (patch) | |
tree | d45804b5fb69af91ea4ae156935931f6b4acd70b /src/nvim/api/ui.c | |
parent | c0fe6c040e19ef9102a8507ffcbd88b83186326a (diff) | |
download | rneovim-6d267ad30cf539f520b46e3c92939f7031ce116f.tar.gz rneovim-6d267ad30cf539f520b46e3c92939f7031ce116f.tar.bz2 rneovim-6d267ad30cf539f520b46e3c92939f7031ce116f.zip |
fix(api): make nvim_get_hl return 'cterm' attrs properly
Diffstat (limited to 'src/nvim/api/ui.c')
-rw-r--r-- | src/nvim/api/ui.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/api/ui.c b/src/nvim/api/ui.c index 201989aee5..5dd858a6a9 100644 --- a/src/nvim/api/ui.c +++ b/src/nvim/api/ui.c @@ -727,8 +727,8 @@ void remote_ui_hl_attr_define(UI *ui, Integer id, HlAttrs rgb_attrs, HlAttrs cte ADD_C(args, INTEGER_OBJ(id)); MAXSIZE_TEMP_DICT(rgb, HLATTRS_DICT_SIZE); MAXSIZE_TEMP_DICT(cterm, HLATTRS_DICT_SIZE); - hlattrs2dict(&rgb, rgb_attrs, true, false); - hlattrs2dict(&cterm, rgb_attrs, false, false); + hlattrs2dict(&rgb, NULL, rgb_attrs, true, false); + hlattrs2dict(&cterm, NULL, rgb_attrs, false, false); ADD_C(args, DICTIONARY_OBJ(rgb)); ADD_C(args, DICTIONARY_OBJ(cterm)); @@ -751,7 +751,7 @@ void remote_ui_highlight_set(UI *ui, int id) } data->hl_id = id; MAXSIZE_TEMP_DICT(dict, HLATTRS_DICT_SIZE); - hlattrs2dict(&dict, syn_attr2entry(id), ui->rgb, false); + hlattrs2dict(&dict, NULL, syn_attr2entry(id), ui->rgb, false); ADD_C(args, DICTIONARY_OBJ(dict)); push_call(ui, "highlight_set", args); } @@ -950,7 +950,7 @@ static Array translate_contents(UI *ui, Array contents, Arena *arena) int attr = (int)item.items[0].data.integer; if (attr) { Dictionary rgb_attrs = arena_dict(arena, HLATTRS_DICT_SIZE); - hlattrs2dict(&rgb_attrs, syn_attr2entry(attr), ui->rgb, false); + hlattrs2dict(&rgb_attrs, NULL, syn_attr2entry(attr), ui->rgb, false); ADD(new_item, DICTIONARY_OBJ(rgb_attrs)); } else { ADD(new_item, DICTIONARY_OBJ((Dictionary)ARRAY_DICT_INIT)); |