From a6cef2504cf215e9c969cf42b71b54054e353031 Mon Sep 17 00:00:00 2001 From: lvgx Date: Mon, 13 Apr 2020 18:51:56 +0200 Subject: Make NNN_COLORS override NO_COLORS (#515) --- src/nnn.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nnn.c b/src/nnn.c index 3233acb..d8a2aa6 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -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(); -- cgit v1.2.3-70-g09d2