]> Sergey Matveev's repositories - nnn.git/commitdiff
Use bold blue for dirs, reset color
authorArun Prakash Jana <engineerarun@gmail.com>
Fri, 30 Jun 2017 12:20:38 +0000 (17:50 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Fri, 30 Jun 2017 15:03:36 +0000 (20:33 +0530)
nnn.c

diff --git a/nnn.c b/nnn.c
index 385fbae9b45bfd6871d7ad4ab8803cb290730029..589e22c86f2df0822e53d02a9eeb73b9065436a2 100644 (file)
--- a/nnn.c
+++ b/nnn.c
@@ -996,7 +996,7 @@ printent(struct entry *ent, int sel)
 
        /* 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 @@ printent_long(struct entry *ent, int sel)
 
        /* 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 @@ redraw(char *path)
        printw(CWD "%s\n\n", g_buf);
 
        if (cfg.showcolor) {
-               attron(COLOR_PAIR(1));
+               attron(COLOR_PAIR(1) | A_BOLD);
                cfg.dircolor = 1;
        }
 
@@ -1711,6 +1711,12 @@ redraw(char *path)
                        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 (ndents) {
                        static char ind[2] = "\0\0";