aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/api/ui.c')
-rw-r--r--src/nvim/api/ui.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nvim/api/ui.c b/src/nvim/api/ui.c
index b42c274411..f955b315a8 100644
--- a/src/nvim/api/ui.c
+++ b/src/nvim/api/ui.c
@@ -784,6 +784,14 @@ void remote_ui_hl_attr_define(UI *ui, Integer id, HlAttrs rgb_attrs, HlAttrs cte
MAXSIZE_TEMP_DICT(cterm, HLATTRS_DICT_SIZE);
hlattrs2dict(&rgb, NULL, rgb_attrs, true, false);
hlattrs2dict(&cterm, NULL, rgb_attrs, false, false);
+
+ // URLs are not added in hlattrs2dict since they are used only by UIs and not by the highlight
+ // system. So we add them here.
+ if (rgb_attrs.url >= 0) {
+ const char *url = hl_get_url((uint32_t)rgb_attrs.url);
+ PUT_C(rgb, "url", STRING_OBJ(cstr_as_string((char *)url)));
+ }
+
ADD_C(args, DICTIONARY_OBJ(rgb));
ADD_C(args, DICTIONARY_OBJ(cterm));