aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-10-02 08:41:09 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-10-02 08:41:09 +0530
commit499127c69889cc29191236e1eb2510247d92ae05 (patch)
tree8e09b07b19ed1d6b69db011aaa827f9e50126642
parent99e32f26f549c767b6f90406a7b5fc797377abeb (diff)
downloadnnn-499127c69889cc29191236e1eb2510247d92ae05.tar.gz
Fix #741
-rw-r--r--src/nnn.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/nnn.c b/src/nnn.c
index a49f2e1..fa5bbcf 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -3676,11 +3676,15 @@ static void printent_long(const struct entry *ent, uint namecols, bool sel)
: (g_state.oldcolor ? A_DIM : COLOR_PAIR(C_MIS));
uint len;
char *size;
+ char selgap[]=" ";
+
+ if (ent->flags & FILE_SELECTED)
+ selgap[1] = '+';
/* Directories are always shown on top */
resetdircolor(ent->flags);
- addch((ent->flags & FILE_SELECTED) ? '+' : ' ');
+ addch(' ');
if (attrs)
attron(attrs);
@@ -3769,14 +3773,18 @@ static void printent_long(const struct entry *ent, uint namecols, bool sel)
}
if (g_state.oldcolor) {
- addstr(" ");
+ if (!sel)
+ attroff(A_DIM);
+ addstr(selgap);
if (!ln) {
attroff(A_DIM);
- attrs ^= A_DIM;
+ attrs ^= A_DIM;
}
} else {
+ if (!sel)
+ attroff(COLOR_PAIR(C_MIS));
#ifndef ICONS_ENABLED
- addstr(" ");
+ addstr(selgap);
#endif
if (ent->flags & FILE_MISSING)
pair = C_MIS;
@@ -3789,7 +3797,7 @@ static void printent_long(const struct entry *ent, uint namecols, bool sel)
attrs |= COLOR_PAIR(pair);
#ifdef ICONS_ENABLED
attroff(attrs);
- addstr(" ");
+ addstr(selgap);
if (sel)
attrs &= ~A_REVERSE;
print_icon(ent, attrs);