Skip to content

Commit

Permalink
Show F for filter mode when not active
Browse files Browse the repository at this point in the history
  • Loading branch information
jarun committed Sep 24, 2024
1 parent e7b0974 commit 6b15af2
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/nnn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1426,6 +1426,12 @@ static void msg(const char *message)
fprintf(stderr, "%s\n", message);
}

static void clearinfoln(void)
{
move(xlines - 2, 0);
clrtoeol();
}

#ifdef KEY_RESIZE
static void handle_key_resize(void)
{
Expand All @@ -1436,9 +1442,7 @@ static void handle_key_resize(void)
/* Clear the old prompt */
static void clearoldprompt(void)
{
// clear info line
move(xlines - 2, 0);
clrtoeol();
clearinfoln();

tolastln();
clrtoeol();
Expand Down Expand Up @@ -3238,9 +3242,6 @@ static int getorderstr(char *sort)
{
int i = 0;

if (cfg.filtermode)
sort[i++] = 'F';

if (cfg.showhidden)
sort[i++] = 'H';

Expand Down Expand Up @@ -3565,6 +3566,7 @@ static int filterentries(char *path, char *lastname)
showfilter(ln);
}
end:
clearinfoln();

/* Save last working filter in-filter */
if (ln[1])
Expand Down Expand Up @@ -6500,8 +6502,10 @@ static void statusbar(char *path)
} else { /* light or detail mode */
char sort[] = "\0\0\0\0\0";

if (getorderstr(sort))
addstr(sort);
if (cfg.filtermode)
addch('F');

getorderstr(sort) ? addstr(sort) : addch(' ');

/* Timestamp */
print_time(&pent->sec, pent->flags);
Expand Down

0 comments on commit 6b15af2

Please sign in to comment.