mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Show selection in reverse in status bar
This commit is contained in:
parent
1fb1ab55a7
commit
9bad3c9399
23
src/nnn.c
23
src/nnn.c
|
@ -5161,14 +5161,28 @@ static void statusbar(char *path)
|
|||
tolastln();
|
||||
attron(COLOR_PAIR(cfg.curctx + 1));
|
||||
|
||||
printw("%d/%d ", cur + 1, ndents);
|
||||
|
||||
if (g_state.selmode) {
|
||||
attron(A_REVERSE);
|
||||
addch(' ');
|
||||
if (g_state.rangesel)
|
||||
addch('*');
|
||||
else if (nselected)
|
||||
addstr(xitoa(nselected));
|
||||
else
|
||||
addch('+');
|
||||
addch(' ');
|
||||
attroff(A_REVERSE);
|
||||
addch(' ');
|
||||
}
|
||||
|
||||
if (cfg.blkorder) { /* du mode */
|
||||
char buf[24];
|
||||
|
||||
xstrsncpy(buf, coolsize(dir_blocks << blk_shift), 12);
|
||||
|
||||
printw("%d/%d [%s:%s] %cu:%s free:%s files:%lu %lldB %s\n",
|
||||
cur + 1, ndents, (g_state.selmode ? "+" : ""),
|
||||
(g_state.rangesel ? "*" : (nselected ? xitoa(nselected) : "")),
|
||||
printw("%cu:%s free:%s files:%lu %lldB %s\n",
|
||||
(cfg.apparentsz ? 'a' : 'd'), buf, coolsize(get_fs_info(path, FREE)),
|
||||
num_files, (ll)pent->blocks << blk_shift, ptr);
|
||||
} else { /* light or detail mode */
|
||||
|
@ -5176,8 +5190,7 @@ static void statusbar(char *path)
|
|||
|
||||
getorderstr(sort);
|
||||
|
||||
printw("%d/%d [%s:%s] %s", cur + 1, ndents, (g_state.selmode ? "+" : ""),
|
||||
(g_state.rangesel ? "*" : (nselected ? xitoa(nselected) : "")), sort);
|
||||
printw("%s", sort);
|
||||
|
||||
/* Timestamp */
|
||||
print_time(&pent->t);
|
||||
|
|
Loading…
Reference in a new issue