mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
File colors is independent of context colors
This commit is contained in:
parent
8ddc659df8
commit
5e3a793480
17
src/nnn.c
17
src/nnn.c
|
@ -1661,11 +1661,14 @@ static bool initcurses(void *oldmask)
|
||||||
use_default_colors();
|
use_default_colors();
|
||||||
|
|
||||||
/* Initialize file colors */
|
/* Initialize file colors */
|
||||||
if (COLORS >= 256 && !(g_state.oldcolor || init_fcolors())) {
|
if (COLORS >= 256) {
|
||||||
exitcurses();
|
if (!(g_state.oldcolor || init_fcolors())) {
|
||||||
fprintf(stderr, "NNN_FCOLORS!\n");
|
exitcurses();
|
||||||
return FALSE;
|
fprintf(stderr, "NNN_FCOLORS!\n");
|
||||||
}
|
return FALSE;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
g_state.oldcolor = 1;
|
||||||
|
|
||||||
if (colors && *colors == '#') {
|
if (colors && *colors == '#') {
|
||||||
char *sep = strchr(colors, ';');
|
char *sep = strchr(colors, ';');
|
||||||
|
@ -1685,10 +1688,8 @@ static bool initcurses(void *oldmask)
|
||||||
colors = sep; /* Detect if 8 colors fallback is appended */
|
colors = sep; /* Detect if 8 colors fallback is appended */
|
||||||
if (colors)
|
if (colors)
|
||||||
++colors;
|
++colors;
|
||||||
g_state.oldcolor = 1;
|
|
||||||
}
|
}
|
||||||
} else
|
}
|
||||||
g_state.oldcolor = 1;
|
|
||||||
|
|
||||||
/* Get and set the context colors */
|
/* Get and set the context colors */
|
||||||
for (uchar i = 0; i < CTX_MAX; ++i) {
|
for (uchar i = 0; i < CTX_MAX; ++i) {
|
||||||
|
|
Loading…
Reference in a new issue