diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2018-08-14 12:33:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-14 12:33:12 +0200 |
commit | f767cee10002afc360af1aad209676d08cc3a758 (patch) | |
tree | f47652d37d72abf921de07ce1bd4ca35f85ca4ce /src/nvim/syntax.c | |
parent | bec5e4cb6183f3b403aca35ef55c3798a48dc64b (diff) | |
parent | fa4c2601000df2d792b0de865da3ac8c43ab723f (diff) | |
download | rneovim-f767cee10002afc360af1aad209676d08cc3a758.tar.gz rneovim-f767cee10002afc360af1aad209676d08cc3a758.tar.bz2 rneovim-f767cee10002afc360af1aad209676d08cc3a758.zip |
Merge pull request #8790 from bfredl/hlattr
pass highlight attrs per value and thread-safely to TUI thread
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r-- | src/nvim/syntax.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index d7c23742ba..3cb998b805 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -16,6 +16,7 @@ #include "nvim/ascii.h" #include "nvim/syntax.h" #include "nvim/charset.h" +#include "nvim/cursor_shape.h" #include "nvim/eval.h" #include "nvim/ex_cmds2.h" #include "nvim/ex_docmd.h" @@ -7228,7 +7229,6 @@ static void set_hl_attr(int idx) HlAttrs at_en = HLATTRS_INIT; struct hl_group *sgp = HL_TABLE() + idx; - at_en.cterm_ae_attr = sgp->sg_cterm; at_en.cterm_fg_color = sgp->sg_cterm_fg; at_en.cterm_bg_color = sgp->sg_cterm_bg; @@ -7241,6 +7241,11 @@ static void set_hl_attr(int idx) at_en.rgb_sp_color = sgp->sg_rgb_sp_name ? sgp->sg_rgb_sp : -1; sgp->sg_attr = hl_get_syn_attr(idx+1, at_en); + + // a cursor style uses this syn_id, make sure its atribute is updated. + if (cursor_mode_uses_syn_id(idx+1)) { + ui_mode_info_set(); + } } /// Lookup a highlight group name and return its ID. |