mirror of
https://github.com/jarun/nnn.git
synced 2025-01-09 17:39:38 +00:00
Use a meaningful macro
This commit is contained in:
parent
0556ac14ec
commit
ab0ab2b5f4
|
@ -187,6 +187,7 @@
|
||||||
#define EXEC_ARGS_MAX 10
|
#define EXEC_ARGS_MAX 10
|
||||||
#define LIST_FILES_MAX (1 << 16)
|
#define LIST_FILES_MAX (1 << 16)
|
||||||
#define SCROLLOFF 3
|
#define SCROLLOFF 3
|
||||||
|
#define COLOR_256 256
|
||||||
|
|
||||||
/* Time intervals */
|
/* Time intervals */
|
||||||
#define DBLCLK_INTERVAL_NS (400000000)
|
#define DBLCLK_INTERVAL_NS (400000000)
|
||||||
|
@ -2091,7 +2092,7 @@ static bool initcurses(void *oldmask)
|
||||||
use_default_colors();
|
use_default_colors();
|
||||||
|
|
||||||
/* Initialize file colors */
|
/* Initialize file colors */
|
||||||
if (COLORS >= 256) {
|
if (COLORS >= COLOR_256) {
|
||||||
if (!(g_state.oldcolor || init_fcolors())) {
|
if (!(g_state.oldcolor || init_fcolors())) {
|
||||||
exitcurses();
|
exitcurses();
|
||||||
msg(env_cfg[NNN_FCOLORS]);
|
msg(env_cfg[NNN_FCOLORS]);
|
||||||
|
@ -2106,7 +2107,7 @@ static bool initcurses(void *oldmask)
|
||||||
if (colors && *colors == '#') {
|
if (colors && *colors == '#') {
|
||||||
char *sep = strchr(colors, ';');
|
char *sep = strchr(colors, ';');
|
||||||
|
|
||||||
if (!g_state.oldcolor && COLORS >= 256) {
|
if (!g_state.oldcolor && COLORS >= COLOR_256) {
|
||||||
++colors;
|
++colors;
|
||||||
ext = TRUE;
|
ext = TRUE;
|
||||||
|
|
||||||
|
@ -2150,7 +2151,7 @@ static bool initcurses(void *oldmask)
|
||||||
|
|
||||||
#ifdef ICONS_ENABLED
|
#ifdef ICONS_ENABLED
|
||||||
if (!g_state.oldcolor) {
|
if (!g_state.oldcolor) {
|
||||||
uchar_t icolors[256] = {0};
|
uchar_t icolors[COLOR_256] = {0};
|
||||||
char c;
|
char c;
|
||||||
|
|
||||||
memset(icon_positions, 0x7f, sizeof(icon_positions));
|
memset(icon_positions, 0x7f, sizeof(icon_positions));
|
||||||
|
|
Loading…
Reference in a new issue