mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Use bold blue for dirs, reset color
This commit is contained in:
parent
e780360e7d
commit
f87bb199a0
12
nnn.c
12
nnn.c
|
@ -996,7 +996,7 @@ printent(struct entry *ent, int sel)
|
||||||
|
|
||||||
/* Dirs are always shown on top */
|
/* Dirs are always shown on top */
|
||||||
if (cfg.dircolor && !S_ISDIR(ent->mode)) {
|
if (cfg.dircolor && !S_ISDIR(ent->mode)) {
|
||||||
attroff(COLOR_PAIR(1));
|
attroff(COLOR_PAIR(1) | A_BOLD);
|
||||||
cfg.dircolor = 0;
|
cfg.dircolor = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1107,7 +1107,7 @@ printent_long(struct entry *ent, int sel)
|
||||||
|
|
||||||
/* Dirs are always shown on top */
|
/* Dirs are always shown on top */
|
||||||
if (cfg.dircolor && !S_ISDIR(ent->mode)) {
|
if (cfg.dircolor && !S_ISDIR(ent->mode)) {
|
||||||
attroff(COLOR_PAIR(1));
|
attroff(COLOR_PAIR(1) | A_BOLD);
|
||||||
cfg.dircolor = 0;
|
cfg.dircolor = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1691,7 +1691,7 @@ redraw(char *path)
|
||||||
printw(CWD "%s\n\n", g_buf);
|
printw(CWD "%s\n\n", g_buf);
|
||||||
|
|
||||||
if (cfg.showcolor) {
|
if (cfg.showcolor) {
|
||||||
attron(COLOR_PAIR(1));
|
attron(COLOR_PAIR(1) | A_BOLD);
|
||||||
cfg.dircolor = 1;
|
cfg.dircolor = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1711,6 +1711,12 @@ redraw(char *path)
|
||||||
printptr(&dents[i], i == cur);
|
printptr(&dents[i], i == cur);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Must reset e.g. no files in dir */
|
||||||
|
if (cfg.dircolor) {
|
||||||
|
attroff(COLOR_PAIR(1) | A_BOLD);
|
||||||
|
cfg.dircolor = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (cfg.showdetail) {
|
if (cfg.showdetail) {
|
||||||
if (ndents) {
|
if (ndents) {
|
||||||
static char ind[2] = "\0\0";
|
static char ind[2] = "\0\0";
|
||||||
|
|
Loading…
Reference in a new issue