mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Show selection in light mode
This commit is contained in:
parent
b2aea5c619
commit
197bedc6ff
10
src/nnn.c
10
src/nnn.c
|
@ -2134,16 +2134,18 @@ static char *get_file_sym(mode_t mode)
|
||||||
static void printent(const struct entry *ent, int sel, uint namecols)
|
static void printent(const struct entry *ent, int sel, uint namecols)
|
||||||
{
|
{
|
||||||
const char *pname = unescape(ent->name, namecols);
|
const char *pname = unescape(ent->name, namecols);
|
||||||
|
const char cp = (ent->flags & FILE_COPIED) ? '+' : ' ';
|
||||||
|
|
||||||
/* Directories are always shown on top */
|
/* Directories are always shown on top */
|
||||||
resetdircolor(ent->flags);
|
resetdircolor(ent->flags);
|
||||||
|
|
||||||
printw("%s%s%s\n", CURSYM(sel), pname, get_file_sym(ent->mode));
|
printw("%s%c%s%s\n", CURSYM(sel), cp, pname, get_file_sym(ent->mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void printent_long(const struct entry *ent, int sel, uint namecols)
|
static void printent_long(const struct entry *ent, int sel, uint namecols)
|
||||||
{
|
{
|
||||||
char timebuf[18], permbuf[4], ind1 = '\0', ind2[] = "\0\0", cp = ' ';
|
char timebuf[18], permbuf[4], ind1 = '\0', ind2[] = "\0\0";
|
||||||
|
const char cp = (ent->flags & FILE_COPIED) ? '+' : ' ';
|
||||||
|
|
||||||
/* Timestamp */
|
/* Timestamp */
|
||||||
strftime(timebuf, 18, "%F %R", localtime(&ent->t));
|
strftime(timebuf, 18, "%F %R", localtime(&ent->t));
|
||||||
|
@ -2157,10 +2159,6 @@ static void printent_long(const struct entry *ent, int sel, uint namecols)
|
||||||
permbuf[2] = permbuf[2] ? permbuf[2] : '0';
|
permbuf[2] = permbuf[2] ? permbuf[2] : '0';
|
||||||
permbuf[3] = '\0';
|
permbuf[3] = '\0';
|
||||||
|
|
||||||
/* Add copy indicator */
|
|
||||||
if (ent->flags & FILE_COPIED)
|
|
||||||
cp = '+';
|
|
||||||
|
|
||||||
/* Trim escape chars from name */
|
/* Trim escape chars from name */
|
||||||
const char *pname = unescape(ent->name, namecols);
|
const char *pname = unescape(ent->name, namecols);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue