From: Arun Prakash Jana Date: Sat, 31 Mar 2018 15:28:13 +0000 (+0530) Subject: Show help on typing ? at empty filter prompt X-Git-Tag: v1.8~31 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=1ea41f2dd000db96ac26c4543e1becb1dbb03356;p=nnn.git Show help on typing ? at empty filter prompt --- diff --git a/nnn.c b/nnn.c index c6b3e194..a2c9d0f9 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);