aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-05-12 02:55:22 -0400
committerJustin M. Keyes <justinkz@gmail.com>2016-05-12 02:55:22 -0400
commitd02cfe80618bb85cc1cc4a19a9cfc69ae64b98af (patch)
treea82201be5b85c63ede348b027ce84a320d59041f /src/nvim/syntax.c
parent48b2faead8488e102f6d731f9d793aafc58dc537 (diff)
parent130a1a6bb296ce21ecb7052fe42d105852b85c59 (diff)
downloadrneovim-d02cfe80618bb85cc1cc4a19a9cfc69ae64b98af.tar.gz
rneovim-d02cfe80618bb85cc1cc4a19a9cfc69ae64b98af.tar.bz2
rneovim-d02cfe80618bb85cc1cc4a19a9cfc69ae64b98af.zip
Merge pull request #4733 from AdnoC/hi-link-cleared-group
Fix linking a cleared highlight group Closes #4549 Closes #2756 Closes #4236
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r--src/nvim/syntax.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c
index b2ab1f8a3a..b04180ad1c 100644
--- a/src/nvim/syntax.c
+++ b/src/nvim/syntax.c
@@ -6939,7 +6939,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);
+ }
}
/*