mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Initialize file type colors as default
This commit is contained in:
parent
f712441eda
commit
8ddc659df8
13
src/nnn.c
13
src/nnn.c
|
@ -1660,6 +1660,13 @@ static bool initcurses(void *oldmask)
|
|||
start_color();
|
||||
use_default_colors();
|
||||
|
||||
/* Initialize file colors */
|
||||
if (COLORS >= 256 && !(g_state.oldcolor || init_fcolors())) {
|
||||
exitcurses();
|
||||
fprintf(stderr, "NNN_FCOLORS!\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (colors && *colors == '#') {
|
||||
char *sep = strchr(colors, ';');
|
||||
|
||||
|
@ -1674,12 +1681,6 @@ static bool initcurses(void *oldmask)
|
|||
*/
|
||||
if (sep)
|
||||
*sep = '\0';
|
||||
|
||||
if (!(g_state.oldcolor || init_fcolors())) {
|
||||
exitcurses();
|
||||
fprintf(stderr, "NNN_FCOLORS!\n");
|
||||
return FALSE;
|
||||
}
|
||||
} else {
|
||||
colors = sep; /* Detect if 8 colors fallback is appended */
|
||||
if (colors)
|
||||
|
|
Loading…
Reference in a new issue