diff options
author | lvgx <l@vgx.fr> | 2020-04-13 18:51:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-13 22:21:56 +0530 |
commit | a6cef2504cf215e9c969cf42b71b54054e353031 (patch) | |
tree | 3c436fb6410bba7b4ef830c815daf5af7c584cf7 /src/nnn.c | |
parent | cd1c458c96cdf5674c2fb793a16e57435ffe05b7 (diff) | |
download | nnn-a6cef2504cf215e9c969cf42b71b54054e353031.tar.gz |
Make NNN_COLORS override NO_COLORS (#515)
Diffstat (limited to 'src/nnn.c')
-rw-r--r-- | src/nnn.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1494,9 +1494,13 @@ static bool initcurses(void *oldmask) #endif curs_set(FALSE); /* Hide cursor */ - if (!getenv("NO_COLOR")) { + char *colors = getenv(env_cfg[NNN_COLORS]); + + if (colors || !getenv("NO_COLOR")) { short i; - char *colors = xgetenv(env_cfg[NNN_COLORS], "4444"); + + if (!colors) + colors = "4444"; start_color(); use_default_colors(); |