mirror of
https://github.com/jarun/nnn.git
synced 2025-01-15 21:36:42 +00:00
Show F for filter mode when not active
This commit is contained in:
parent
e7b0974551
commit
6b15af2be5
20
src/nnn.c
20
src/nnn.c
|
@ -1426,6 +1426,12 @@ static void msg(const char *message)
|
||||||
fprintf(stderr, "%s\n", message);
|
fprintf(stderr, "%s\n", message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void clearinfoln(void)
|
||||||
|
{
|
||||||
|
move(xlines - 2, 0);
|
||||||
|
clrtoeol();
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef KEY_RESIZE
|
#ifdef KEY_RESIZE
|
||||||
static void handle_key_resize(void)
|
static void handle_key_resize(void)
|
||||||
{
|
{
|
||||||
|
@ -1436,9 +1442,7 @@ static void handle_key_resize(void)
|
||||||
/* Clear the old prompt */
|
/* Clear the old prompt */
|
||||||
static void clearoldprompt(void)
|
static void clearoldprompt(void)
|
||||||
{
|
{
|
||||||
// clear info line
|
clearinfoln();
|
||||||
move(xlines - 2, 0);
|
|
||||||
clrtoeol();
|
|
||||||
|
|
||||||
tolastln();
|
tolastln();
|
||||||
clrtoeol();
|
clrtoeol();
|
||||||
|
@ -3238,9 +3242,6 @@ static int getorderstr(char *sort)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
if (cfg.filtermode)
|
|
||||||
sort[i++] = 'F';
|
|
||||||
|
|
||||||
if (cfg.showhidden)
|
if (cfg.showhidden)
|
||||||
sort[i++] = 'H';
|
sort[i++] = 'H';
|
||||||
|
|
||||||
|
@ -3565,6 +3566,7 @@ static int filterentries(char *path, char *lastname)
|
||||||
showfilter(ln);
|
showfilter(ln);
|
||||||
}
|
}
|
||||||
end:
|
end:
|
||||||
|
clearinfoln();
|
||||||
|
|
||||||
/* Save last working filter in-filter */
|
/* Save last working filter in-filter */
|
||||||
if (ln[1])
|
if (ln[1])
|
||||||
|
@ -6500,8 +6502,10 @@ static void statusbar(char *path)
|
||||||
} else { /* light or detail mode */
|
} else { /* light or detail mode */
|
||||||
char sort[] = "\0\0\0\0\0";
|
char sort[] = "\0\0\0\0\0";
|
||||||
|
|
||||||
if (getorderstr(sort))
|
if (cfg.filtermode)
|
||||||
addstr(sort);
|
addch('F');
|
||||||
|
|
||||||
|
getorderstr(sort) ? addstr(sort) : addch(' ');
|
||||||
|
|
||||||
/* Timestamp */
|
/* Timestamp */
|
||||||
print_time(&pent->sec, pent->flags);
|
print_time(&pent->sec, pent->flags);
|
||||||
|
|
Loading…
Reference in a new issue