0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.0.0754: terminal window does not support colors

Problem:    Terminal window does not support colors.
Solution:   Lookup the color attribute.
This commit is contained in:
Bram Moolenaar
2017-07-23 15:48:37 +02:00
parent b13501f7da
commit eeac677886
4 changed files with 186 additions and 3 deletions

View File

@@ -8780,6 +8780,21 @@ get_attr_entry(garray_T *table, attrentry_T *aep)
return (table->ga_len - 1 + ATTR_OFF);
}
/*
* 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.
*/