aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-08-06 00:27:12 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-08-06 00:27:12 +0530
commit8ddc659df8c63ad4caf7d7a629d297106f9348ef (patch)
tree3b99fa07e6b171a8c1d5905fcb020f34fd6da18b
parentf712441edab64c45e980da9910974af5364ff564 (diff)
downloadnnn-8ddc659df8c63ad4caf7d7a629d297106f9348ef.tar.gz
Initialize file type colors as default
-rw-r--r--src/nnn.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/nnn.c b/src/nnn.c
index da42690..6aa13f5 100644
--- a/src/nnn.c
+++ b/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)