mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 13:51:31 +00:00
Show help on typing ? at empty filter prompt
This commit is contained in:
parent
ef689d08b6
commit
1ea41f2dd0
11
nnn.c
11
nnn.c
|
@ -1164,6 +1164,11 @@ filterentries(char *path)
|
||||||
if (len == 1)
|
if (len == 1)
|
||||||
cur = oldcur;
|
cur = oldcur;
|
||||||
goto end;
|
goto end;
|
||||||
|
case '?': // '?' is an invalid regex, show help instead
|
||||||
|
if (len == 1) {
|
||||||
|
cur = oldcur;
|
||||||
|
goto end;
|
||||||
|
} // fallthrough
|
||||||
default:
|
default:
|
||||||
/* Reset cur in case it's a repeat search */
|
/* Reset cur in case it's a repeat search */
|
||||||
if (len == 1)
|
if (len == 1)
|
||||||
|
@ -3184,8 +3189,12 @@ nochange:
|
||||||
goto begin;
|
goto begin;
|
||||||
case SEL_HELP:
|
case SEL_HELP:
|
||||||
show_help(path);
|
show_help(path);
|
||||||
|
|
||||||
|
/* Continue in navigate-as-you-type mode, if enabled */
|
||||||
|
if (cfg.filtermode)
|
||||||
|
presel = FILTER;
|
||||||
break;
|
break;
|
||||||
case SEL_RUN: // fallthorugh
|
case SEL_RUN: // fallthrough
|
||||||
case SEL_RUNSCRIPT:
|
case SEL_RUNSCRIPT:
|
||||||
run = xgetenv(env, run);
|
run = xgetenv(env, run);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue