diff options
author | 2020-08-02 00:40:51 +0530 | |
---|---|---|
committer | 2020-08-02 00:40:51 +0530 | |
commit | 9bad3c93999644678d6f474d20e9065a67f4ab85 (patch) | |
tree | d66e3bf5e94e0667333843b503b438160c4566f3 /src | |
parent | 1fb1ab55a7cb69ec6e0214676e314de07077eb5b (diff) | |
download | nnn-9bad3c93999644678d6f474d20e9065a67f4ab85.tar.gz |
Show selection in reverse in status bar
Diffstat (limited to 'src')
-rw-r--r-- | src/nnn.c | 23 |
1 files changed, 18 insertions, 5 deletions
@@ -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); |