aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/ui.c
diff options
context:
space:
mode:
authorNull Chilly <56817415+nullchilly@users.noreply.github.com>2023-03-23 16:31:39 +0700
committerGitHub <noreply@github.com>2023-03-23 10:31:39 +0100
commitc0fe6c040e19ef9102a8507ffcbd88b83186326a (patch)
treeabaecffb9bfd97ae0f00502c7560eb001100c135 /src/nvim/api/ui.c
parentea0b66d208dbcd5d5c0a17810596d769c7a0b6dd (diff)
downloadrneovim-c0fe6c040e19ef9102a8507ffcbd88b83186326a.tar.gz
rneovim-c0fe6c040e19ef9102a8507ffcbd88b83186326a.tar.bz2
rneovim-c0fe6c040e19ef9102a8507ffcbd88b83186326a.zip
feat(api): add nvim_get_hl (#22693)
Problem: no way of getting all highlight group definitions in a namespace. Solution: add `nvim_get_hl()`, deprecate `nvim_get_hl_by_name()` and `nvim_get_hl_by_id()`.
Diffstat (limited to 'src/nvim/api/ui.c')
-rw-r--r--src/nvim/api/ui.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/api/ui.c b/src/nvim/api/ui.c
index a8f5d2e070..201989aee5 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);
- hlattrs2dict(&cterm, rgb_attrs, false);
+ hlattrs2dict(&rgb, rgb_attrs, true, false);
+ hlattrs2dict(&cterm, 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);
+ hlattrs2dict(&dict, 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);
+ hlattrs2dict(&rgb_attrs, syn_attr2entry(attr), ui->rgb, false);
ADD(new_item, DICTIONARY_OBJ(rgb_attrs));
} else {
ADD(new_item, DICTIONARY_OBJ((Dictionary)ARRAY_DICT_INIT));