aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-03-31 20:58:13 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-03-31 21:02:35 +0530
commit1ea41f2dd000db96ac26c4543e1becb1dbb03356 (patch)
tree08ab9321df4f04059c0725c5f4a49a6b269fafad
parentef689d08b669def288ff8844b39e8fb0d49ac600 (diff)
downloadnnn-1ea41f2dd000db96ac26c4543e1becb1dbb03356.tar.gz
Show help on typing ? at empty filter prompt
-rw-r--r--nnn.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/nnn.c b/nnn.c
index c6b3e19..a2c9d0f 100644
--- a/nnn.c
+++ b/nnn.c
@@ -1164,6 +1164,11 @@ filterentries(char *path)
if (len == 1)
cur = oldcur;
goto end;
+ case '?': // '?' is an invalid regex, show help instead
+ if (len == 1) {
+ cur = oldcur;
+ goto end;
+ } // fallthrough
default:
/* Reset cur in case it's a repeat search */
if (len == 1)
@@ -3184,8 +3189,12 @@ nochange:
goto begin;
case SEL_HELP:
show_help(path);
+
+ /* Continue in navigate-as-you-type mode, if enabled */
+ if (cfg.filtermode)
+ presel = FILTER;
break;
- case SEL_RUN: // fallthorugh
+ case SEL_RUN: // fallthrough
case SEL_RUNSCRIPT:
run = xgetenv(env, run);