From dc16ca2340cbe1403935ce44f13756825b85fa06 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Tue, 26 Apr 2022 03:59:12 +0530 Subject: [PATCH] Add 2 spaces after icons for better visibility --- src/icons.h | 4 +++- src/nnn.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/icons.h b/src/icons.h index 0daeb7c7..35d3252a 100644 --- a/src/icons.h +++ b/src/icons.h @@ -23,7 +23,9 @@ struct icon_pair { */ #define ICON_PADDING_LEFT "" -#define ICON_PADDING_RIGHT " " +#define ICON_PADDING_LEFT_LEN (0) +#define ICON_PADDING_RIGHT " " +#define ICON_PADDING_RIGHT_LEN (2) #define COLOR_VIDEO 93 /* Purple */ #define COLOR_AUDIO 220 /* Gold1 */ diff --git a/src/nnn.c b/src/nnn.c index e97b7740..97aae093 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -6373,7 +6373,7 @@ static int adjust_cols(int n) { /* Calculate the number of cols available to print entry name */ #ifdef ICONS_ENABLED - n -= (g_state.oldcolor ? 0 : 1 + xstrlen(ICON_PADDING_LEFT) + xstrlen(ICON_PADDING_RIGHT)); + n -= (g_state.oldcolor ? 0 : 1 + ICON_PADDING_LEFT_LEN + ICON_PADDING_RIGHT_LEN); #endif if (cfg.showdetail) { /* Fallback to light mode if less than 35 columns */