File colors is independent of context colors

This commit is contained in:
Arun Prakash Jana 2020-08-06 01:06:21 +05:30
parent 8ddc659df8
commit 5e3a793480
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 9 additions and 8 deletions

View File

@ -1661,11 +1661,14 @@ static bool initcurses(void *oldmask)
use_default_colors();
/* Initialize file colors */
if (COLORS >= 256 && !(g_state.oldcolor || init_fcolors())) {
exitcurses();
fprintf(stderr, "NNN_FCOLORS!\n");
return FALSE;
}
if (COLORS >= 256) {
if (!(g_state.oldcolor || init_fcolors())) {
exitcurses();
fprintf(stderr, "NNN_FCOLORS!\n");
return FALSE;
}
} else
g_state.oldcolor = 1;
if (colors && *colors == '#') {
char *sep = strchr(colors, ';');
@ -1685,10 +1688,8 @@ static bool initcurses(void *oldmask)
colors = sep; /* Detect if 8 colors fallback is appended */
if (colors)
++colors;
g_state.oldcolor = 1;
}
} else
g_state.oldcolor = 1;
}
/* Get and set the context colors */
for (uchar i = 0; i < CTX_MAX; ++i) {