summaryrefslogtreecommitdiff
path: root/src/syntax.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 4e1d45007..b48ca0079 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -8887,6 +8887,7 @@ get_attr_entry(garray_T *table, attrentry_T *aep)
return (table->ga_len - 1 + ATTR_OFF);
}
+#if defined(FEAT_TERMINAL) || defined(PROTO)
/*
* Get an attribute index for a cterm entry.
* Uses an existing entry when possible or adds one when needed.
@@ -8906,8 +8907,9 @@ get_cterm_attr_idx(int attr, int fg, int bg)
at_en.ae_u.cterm.bg_color = bg;
return get_attr_entry(&cterm_attr_table, &at_en);
}
+#endif
-#if defined(FEAT_TERMGUICOLORS) || defined(PROTO)
+#if (defined(FEAT_TERMINAL) && defined(FEAT_TERMGUICOLORS)) || defined(PROTO)
/*
* Get an attribute index for a 'termguicolors' entry.
* Uses an existing entry when possible or adds one when needed.
@@ -8935,7 +8937,7 @@ get_tgc_attr_idx(int attr, guicolor_T fg, guicolor_T bg)
}
#endif
-#if defined(FEAT_GUI) || defined(PROTO)
+#if (defined(FEAT_TERMINAL) && defined(FEAT_GUI)) || defined(PROTO)
/*
* Get an attribute index for a cterm entry.
* Uses an existing entry when possible or adds one when needed.