summaryrefslogtreecommitdiffstats
path: root/mutt.h
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2021-04-11 14:19:33 -0700
committerKevin McCarthy <kevin@8t8.us>2021-04-15 17:58:56 -0700
commitc20a5169f7a3b5525f1d8c0ee4b0743d8358a98c (patch)
treeee113d04cbc384279f23c4ea0063d4034fff8ef0 /mutt.h
parent869c6cc49ccd861f78990dd60e5c3ec770511700 (diff)
Use bkgrndset() as ATTRSET() backend if available.
This function allows more usable color pairs, because it passes the pair parameter separately. The COLOR_PAIR() macro only returns 8-bits for a pair, limiting the total pairs used to 256 despite many systems having much larger COLOR_PAIRS values. In order to do this, separate out the pair and attrs values, instead of combining attr + COLOR_PAIR(pair) into a single value and storing that inside Mutt. For the older calls, bkgdset() and attrset(), we call COLOR_PAIR() at the last minute. Add COLOR_ATTR to header cache sum calculation, since it is used in the HEADER now.
Diffstat (limited to 'mutt.h')
-rw-r--r--mutt.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/mutt.h b/mutt.h
index 257e4289..b7f9d234 100644
--- a/mutt.h
+++ b/mutt.h
@@ -61,6 +61,7 @@
#include "hash.h"
#include "charset.h"
#include "buffer.h"
+#include "color.h"
#ifndef HAVE_WC_FUNCS
# ifdef MB_LEN_MAX
@@ -910,7 +911,7 @@ typedef struct header
short recipient; /* user_is_recipient()'s return value, cached */
- int pair; /* color-pair to use when displaying in the index */
+ COLOR_ATTR color; /* color-pair to use when displaying in the index */
time_t date_sent; /* time when the message was sent (UTC) */
time_t received; /* time when the message was placed in the mailbox */