nnn.c | 12 +++++++++--- diff --git a/nnn.c b/nnn.c index 385fbae9b45bfd6871d7ad4ab8803cb290730029..589e22c86f2df0822e53d02a9eeb73b9065436a2 100644 --- a/nnn.c +++ b/nnn.c @@ -996,7 +996,7 @@ replace_escape(ent->name)); /* Dirs are always shown on top */ if (cfg.dircolor && !S_ISDIR(ent->mode)) { - attroff(COLOR_PAIR(1)); + attroff(COLOR_PAIR(1) | A_BOLD); cfg.dircolor = 0; } @@ -1107,7 +1107,7 @@ } /* Dirs are always shown on top */ if (cfg.dircolor && !S_ISDIR(ent->mode)) { - attroff(COLOR_PAIR(1)); + attroff(COLOR_PAIR(1) | A_BOLD); cfg.dircolor = 0; } @@ -1691,7 +1691,7 @@ g_buf[ncols - strlen(CWD) - 1] = '\0'; printw(CWD "%s\n\n", g_buf); if (cfg.showcolor) { - attron(COLOR_PAIR(1)); + attron(COLOR_PAIR(1) | A_BOLD); cfg.dircolor = 1; } @@ -1709,6 +1709,12 @@ odd = ISODD(nlines); nlines >>= 1; for (i = cur - nlines; i < cur + nlines + odd; ++i) 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) {