diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-07-16 10:17:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-16 10:17:29 +0200 |
commit | 8a3f8589a3eda5d42068fad5f5430f4e648f6f0e (patch) | |
tree | 148155fd00a28ad8979292ec5af5a39072411a4c /src/nvim/syntax.c | |
parent | 6aab5715c55504bf6301a5d4bc113485e881c6ae (diff) | |
parent | 857b29bdd8e093948311c5254a84745c9324b496 (diff) | |
download | rneovim-8a3f8589a3eda5d42068fad5f5430f4e648f6f0e.tar.gz rneovim-8a3f8589a3eda5d42068fad5f5430f4e648f6f0e.tar.bz2 rneovim-8a3f8589a3eda5d42068fad5f5430f4e648f6f0e.zip |
Merge pull request #10504 from bfredl/hl_def
highlight: expose builtin highlight groups using hl_group_set event
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r-- | src/nvim/syntax.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index 3066ffbb0c..192cf9cb75 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" @@ -7504,6 +7505,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 |