summaryrefslogtreecommitdiff
path: root/src/syntax.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-07-23 15:48:37 +0200
committerBram Moolenaar <Bram@vim.org>2017-07-23 15:48:37 +0200
commiteeac67788677a9ea81bcab69f81b4fc22c2adc00 (patch)
tree178ae643b4f83ddade1086a13bbb4dfbd4c11119 /src/syntax.c
parentb13501f7dada4154fc7633d79989d1dab98ae99d (diff)
downloadvim-git-eeac67788677a9ea81bcab69f81b4fc22c2adc00.tar.gz
patch 8.0.0754: terminal window does not support colorsv8.0.0754
Problem: Terminal window does not support colors. Solution: Lookup the color attribute.
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 09013b07c..4cd753c1e 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -8781,6 +8781,21 @@ get_attr_entry(garray_T *table, attrentry_T *aep)
}
/*
+ * Get an attribute index for a cterm entry.
+ * Uses an existing entry when possible or adds one when needed.
+ */
+ int
+get_cterm_attr_idx(int attr, int fg, int bg)
+{
+ attrentry_T at_en;
+
+ at_en.ae_attr = attr;
+ at_en.ae_u.cterm.fg_color = fg;
+ at_en.ae_u.cterm.bg_color = bg;
+ return get_attr_entry(&cterm_attr_table, &at_en);
+}
+
+/*
* Clear all highlight tables.
*/
void