diff options
author | AdnoC <adam.r.cutler@gmail.com> | 2016-05-10 15:24:36 -0400 |
---|---|---|
committer | AdnoC <adam.r.cutler@gmail.com> | 2016-05-10 16:08:53 -0400 |
commit | e63e49d49b25837855cf9cd591dab9d811e0e360 (patch) | |
tree | bddbb19220b0e02e7fa37e8eade6cf9f602e455c /src | |
parent | 0bfc1f33a02e2ea405a2df7eee67f093b56fa997 (diff) | |
download | rneovim-e63e49d49b25837855cf9cd591dab9d811e0e360.tar.gz rneovim-e63e49d49b25837855cf9cd591dab9d811e0e360.tar.bz2 rneovim-e63e49d49b25837855cf9cd591dab9d811e0e360.zip |
syntax: Allow cleared highlight groups to be linked
Diffstat (limited to 'src')
-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 41af7af55c..24edc8afb2 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -6931,7 +6931,12 @@ set_hl_attr ( // before setting attr_entry->{f,g}g_color to a other than -1 at_en.rgb_fg_color = sgp->sg_rgb_fg_name ? sgp->sg_rgb_fg : -1; at_en.rgb_bg_color = sgp->sg_rgb_bg_name ? sgp->sg_rgb_bg : -1; - sgp->sg_attr = get_attr_entry(&at_en); + + if (at_en.cterm_fg_color != 0 || at_en.cterm_bg_color != 0 + || at_en.rgb_fg_color != -1 || at_en.rgb_bg_color != -1 + || at_en.cterm_ae_attr != 0 || at_en.rgb_ae_attr != 0) { + sgp->sg_attr = get_attr_entry(&at_en); + } } /* |