diff options
author | Kevin McCarthy <kevin@8t8.us> | 2021-01-08 19:04:18 -0800 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2021-01-08 19:09:33 -0800 |
commit | b67ae9cef7aed5a4f4189883e8e92f08efbb8dc1 (patch) | |
tree | 6295222c24edaed472f0427c86c38f8ff0ee5b79 | |
parent | 26f41dd1f7678fc7e09ebc88167c4c6a51b6f4a5 (diff) |
Fix color overlay when HAVE_COLOR is unset.
mutt_merge_colors() and mutt_attrset_cursor() were not defined in that
case, but are called in the menu and sidebar.
Change mutt_merge_colors() to just combine attributes in that case.
-rw-r--r-- | color.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -241,13 +241,19 @@ static COLOR_LIST *mutt_find_color_by_pair (int pair) return NULL; } +#endif /* HAVE_COLOR */ + int mutt_merge_colors (int source_pair, int overlay_pair) { +#ifdef HAVE_COLOR COLOR_LIST *source, *overlay; - int merged_pair, merged_fg, merged_bg; + int merged_fg, merged_bg; +#endif + int merged_pair; merged_pair = overlay_pair; +#ifdef HAVE_COLOR overlay = mutt_find_color_by_pair (overlay_pair & A_COLOR); if (overlay && (overlay->fg < 0 || overlay->bg < 0)) @@ -260,6 +266,7 @@ int mutt_merge_colors (int source_pair, int overlay_pair) merged_pair = mutt_alloc_color (merged_fg, merged_bg, 0); } } +#endif /* HAVE_COLOR */ merged_pair |= (source_pair & ATTR_MASK) | (overlay_pair & ATTR_MASK); @@ -276,6 +283,8 @@ void mutt_attrset_cursor (int source_pair, int cursor_pair) ATTRSET (merged_pair); } +#ifdef HAVE_COLOR + int mutt_alloc_color (int fg, int bg, int ref) { COLOR_LIST *p = ColorList; |