mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Reduce checks in per-entry print loop
This commit is contained in:
parent
177b60e6c2
commit
6222cac4bf
13
src/nnn.c
13
src/nnn.c
|
@ -3765,8 +3765,7 @@ static void printent(const struct entry *ent, uint_t namecols, bool sel)
|
||||||
(char)('0' + ((ent->mode >> 3) & 7)),
|
(char)('0' + ((ent->mode >> 3) & 7)),
|
||||||
(char)('0' + (ent->mode & 7)), '\0'};
|
(char)('0' + (ent->mode & 7)), '\0'};
|
||||||
|
|
||||||
addch(sel ? ' ' | A_REVERSE : ' '); /* Reversed block for hovered entry */
|
addch(' ');
|
||||||
|
|
||||||
attrs = g_state.oldcolor ? (resetdircolor(ent->flags), A_DIM)
|
attrs = g_state.oldcolor ? (resetdircolor(ent->flags), A_DIM)
|
||||||
: (fcolors[C_MIS] ? COLOR_PAIR(C_MIS) : 0);
|
: (fcolors[C_MIS] ? COLOR_PAIR(C_MIS) : 0);
|
||||||
if (attrs)
|
if (attrs)
|
||||||
|
@ -5778,6 +5777,11 @@ static void draw_line(char *path, int ncols)
|
||||||
if (dir)
|
if (dir)
|
||||||
attroff(COLOR_PAIR(cfg.curctx + 1) | A_BOLD);
|
attroff(COLOR_PAIR(cfg.curctx + 1) | A_BOLD);
|
||||||
|
|
||||||
|
if (cfg.showdetail) { /* Reversed block for hovered entry */
|
||||||
|
tocursor();
|
||||||
|
addch(' ' | A_REVERSE);
|
||||||
|
}
|
||||||
|
|
||||||
statusbar(path);
|
statusbar(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5900,6 +5904,11 @@ static void redraw(char *path)
|
||||||
addch('v');
|
addch('v');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cfg.showdetail) { /* Reversed block for hovered entry */
|
||||||
|
tocursor();
|
||||||
|
addch(' ' | A_REVERSE);
|
||||||
|
}
|
||||||
|
|
||||||
statusbar(path);
|
statusbar(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue