瀏覽代碼

Use bold blue for dirs, reset color

master
Arun Prakash Jana 7 年之前
父節點
當前提交
f87bb199a0
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: A75979F35C080412
共有 1 個檔案被更改,包括 9 行新增3 行删除
  1. +9
    -3
      nnn.c

+ 9
- 3
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";


Loading…
取消
儲存