diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2020-08-06 01:06:21 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2020-08-06 01:06:21 +0530 |
commit | 5e3a79348096fc8781472f2accd1f37fc0eef577 (patch) | |
tree | 2cff346d8c6e1a1923e673b49dde7e5accb0d3c6 | |
parent | 8ddc659df8c63ad4caf7d7a629d297106f9348ef (diff) | |
download | nnn-5e3a79348096fc8781472f2accd1f37fc0eef577.tar.gz |
File colors is independent of context colors
-rw-r--r-- | src/nnn.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -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) { |