mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Fix #741
This commit is contained in:
parent
99e32f26f5
commit
499127c698
18
src/nnn.c
18
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));
|
: (g_state.oldcolor ? A_DIM : COLOR_PAIR(C_MIS));
|
||||||
uint len;
|
uint len;
|
||||||
char *size;
|
char *size;
|
||||||
|
char selgap[]=" ";
|
||||||
|
|
||||||
|
if (ent->flags & FILE_SELECTED)
|
||||||
|
selgap[1] = '+';
|
||||||
|
|
||||||
/* Directories are always shown on top */
|
/* Directories are always shown on top */
|
||||||
resetdircolor(ent->flags);
|
resetdircolor(ent->flags);
|
||||||
|
|
||||||
addch((ent->flags & FILE_SELECTED) ? '+' : ' ');
|
addch(' ');
|
||||||
|
|
||||||
if (attrs)
|
if (attrs)
|
||||||
attron(attrs);
|
attron(attrs);
|
||||||
|
@ -3769,14 +3773,18 @@ static void printent_long(const struct entry *ent, uint namecols, bool sel)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_state.oldcolor) {
|
if (g_state.oldcolor) {
|
||||||
addstr(" ");
|
if (!sel)
|
||||||
|
attroff(A_DIM);
|
||||||
|
addstr(selgap);
|
||||||
if (!ln) {
|
if (!ln) {
|
||||||
attroff(A_DIM);
|
attroff(A_DIM);
|
||||||
attrs ^= A_DIM;
|
attrs ^= A_DIM;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (!sel)
|
||||||
|
attroff(COLOR_PAIR(C_MIS));
|
||||||
#ifndef ICONS_ENABLED
|
#ifndef ICONS_ENABLED
|
||||||
addstr(" ");
|
addstr(selgap);
|
||||||
#endif
|
#endif
|
||||||
if (ent->flags & FILE_MISSING)
|
if (ent->flags & FILE_MISSING)
|
||||||
pair = C_MIS;
|
pair = C_MIS;
|
||||||
|
@ -3789,7 +3797,7 @@ static void printent_long(const struct entry *ent, uint namecols, bool sel)
|
||||||
attrs |= COLOR_PAIR(pair);
|
attrs |= COLOR_PAIR(pair);
|
||||||
#ifdef ICONS_ENABLED
|
#ifdef ICONS_ENABLED
|
||||||
attroff(attrs);
|
attroff(attrs);
|
||||||
addstr(" ");
|
addstr(selgap);
|
||||||
if (sel)
|
if (sel)
|
||||||
attrs &= ~A_REVERSE;
|
attrs &= ~A_REVERSE;
|
||||||
print_icon(ent, attrs);
|
print_icon(ent, attrs);
|
||||||
|
|
Loading…
Reference in a new issue