Initialize all possible color pairs

This is actually possible with use_default_colors!
master
Curtis McEnroe 2018-08-05 18:34:35 -04:00
parent dbed1929dc
commit 5bb96a79e7
No known key found for this signature in database
GPG Key ID: CEA2F97ADCFCD77C
1 changed files with 2 additions and 2 deletions

4
ui.c
View File

@ -42,7 +42,7 @@ static void colorInit(void) {
start_color(); start_color();
use_default_colors(); use_default_colors();
if (COLORS >= 16) { if (COLORS >= 16) {
for (short pair = 0; pair < 0xFF; ++pair) { for (short pair = 0; pair < 0x100; ++pair) {
if (pair < 0x10) { if (pair < 0x10) {
init_pair(1 + pair, pair, -1); init_pair(1 + pair, pair, -1);
} else { } else {
@ -50,7 +50,7 @@ static void colorInit(void) {
} }
} }
} else { } else {
for (short pair = 0; pair < 077; ++pair) { for (short pair = 0; pair < 0100; ++pair) {
if (pair < 010) { if (pair < 010) {
init_pair(1 + pair, pair, -1); init_pair(1 + pair, pair, -1);
} else { } else {