mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +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();
|
tolastln();
|
||||||
attron(COLOR_PAIR(cfg.curctx + 1));
|
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 */
|
if (cfg.blkorder) { /* du mode */
|
||||||
char buf[24];
|
char buf[24];
|
||||||
|
|
||||||
xstrsncpy(buf, coolsize(dir_blocks << blk_shift), 12);
|
xstrsncpy(buf, coolsize(dir_blocks << blk_shift), 12);
|
||||||
|
|
||||||
printw("%d/%d [%s:%s] %cu:%s free:%s files:%lu %lldB %s\n",
|
printw("%cu:%s free:%s files:%lu %lldB %s\n",
|
||||||
cur + 1, ndents, (g_state.selmode ? "+" : ""),
|
|
||||||
(g_state.rangesel ? "*" : (nselected ? xitoa(nselected) : "")),
|
|
||||||
(cfg.apparentsz ? 'a' : 'd'), buf, coolsize(get_fs_info(path, FREE)),
|
(cfg.apparentsz ? 'a' : 'd'), buf, coolsize(get_fs_info(path, FREE)),
|
||||||
num_files, (ll)pent->blocks << blk_shift, ptr);
|
num_files, (ll)pent->blocks << blk_shift, ptr);
|
||||||
} else { /* light or detail mode */
|
} else { /* light or detail mode */
|
||||||
|
@ -5176,8 +5190,7 @@ static void statusbar(char *path)
|
||||||
|
|
||||||
getorderstr(sort);
|
getorderstr(sort);
|
||||||
|
|
||||||
printw("%d/%d [%s:%s] %s", cur + 1, ndents, (g_state.selmode ? "+" : ""),
|
printw("%s", sort);
|
||||||
(g_state.rangesel ? "*" : (nselected ? xitoa(nselected) : "")), sort);
|
|
||||||
|
|
||||||
/* Timestamp */
|
/* Timestamp */
|
||||||
print_time(&pent->t);
|
print_time(&pent->t);
|
||||||
|
|
Loading…
Reference in a new issue