projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
workaround a stupid issue in how decoding is performed in mutt *sigh*
[apps/madmutt.git]
/
lib-ui
/
madtty.c
diff --git
a/lib-ui/madtty.c
b/lib-ui/madtty.c
index
85bd257
..
4cc53fb
100644
(file)
--- a/
lib-ui/madtty.c
+++ b/
lib-ui/madtty.c
@@
-957,7
+957,6
@@
void madtty_init_colors(void)
{
if (COLOR_PAIRS > 64) {
use_default_colors();
{
if (COLOR_PAIRS > 64) {
use_default_colors();
- assume_default_colors(-1, -1);
has_default = 1;
for (int bg = -1; bg < 8; bg++) {
has_default = 1;
for (int bg = -1; bg < 8; bg++) {
@@
-966,9
+965,16
@@
void madtty_init_colors(void)
}
}
} else {
}
}
} else {
+ int use_default = use_default_colors() == OK;
for (int bg = 0; bg < 8; bg++) {
for (int fg = 0; fg < 8; fg++) {
for (int bg = 0; bg < 8; bg++) {
for (int fg = 0; fg < 8; fg++) {
- init_pair((7 - fg) * 8 + bg, fg, bg);
+ if (use_default) {
+ init_pair((7 - fg) * 8 + bg,
+ fg == COLOR_WHITE ? -1 : fg,
+ bg == COLOR_BLACK ? -1 : bg);
+ } else {
+ init_pair((7 - fg) * 8 + bg, fg, bg);
+ }
}
}
}
}
}
}