From 857b29bdd8e093948311c5254a84745c9324b496 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Sun, 14 Jul 2019 13:26:40 +0200 Subject: highlight: expose builtin highlight groups using hl_group_set event --- src/nvim/syntax.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/nvim/syntax.c') diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index e39075739c..bcb18b6e67 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -14,6 +14,7 @@ #include "nvim/vim.h" #include "nvim/ascii.h" +#include "nvim/api/private/helpers.h" #include "nvim/syntax.h" #include "nvim/charset.h" #include "nvim/cursor_shape.h" @@ -7500,6 +7501,12 @@ void highlight_changed(void) highlight_attr[hlf] = hl_get_ui_attr(hlf, final_id, hlf == (int)HLF_INACTIVE); + + if (highlight_attr[hlf] != highlight_attr_last[hlf]) { + ui_call_hl_group_set(cstr_as_string((char *)hlf_names[hlf]), + highlight_attr[hlf]); + highlight_attr_last[hlf] = highlight_attr[hlf]; + } } /* Setup the user highlights -- cgit