aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-02-27 08:47:00 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-02-27 08:47:00 +0530
commit74e77f78fa9d4e89c9b2660997545528d2d1a2a3 (patch)
tree03fa5cbbb62a93148a36dbc0da4b95678855e5e9 /src
parentc6cc8a5181c991ccfd7786deb6365cbb7fa95cb8 (diff)
downloadnnn-74e77f78fa9d4e89c9b2660997545528d2d1a2a3.tar.gz
Support more sepecial keys at empty prompt in nav-as-you-type
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 2444f97..bfb6568 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -2497,14 +2497,24 @@ static int filterentries(char *path, char *lastname)
goto end;
if (len == 1) {
- switch (*ch) {
- case '=': // fallthrough /* Launch app */
- case ']': // fallthorugh /* Prompt key */
- case ';': // fallthrough /* Run plugin key */
- case ',': // fallthrough /* Pin CWD */
- case '~': // fallthrough /* Go HOME */
- case '?': /* Help and config key, '?' is an invalid regex */
+ if (*ch == '?') /* Help and config key, '?' is an invalid regex */
goto end;
+
+ if (cfg.filtermode) {
+ switch (*ch) {
+ case '\'': // fallthrough /* Go to first non-dir file */
+ case '+': // fallthrough /* Toggle proceed on open */
+ case ',': // fallthrough /* Pin CWD */
+ case '-': // fallthrough /* Visit last visited dir */
+ case '.': // fallthrough /* Show hidden files */
+ case ';': // fallthrough /* Run plugin key */
+ case '=': // fallthrough /* Launch app */
+ case '@': // fallthrough /* Visit start dir */
+ case ']': // fallthorugh /* Prompt key */
+ case '`': // fallthrough /* Visit / */
+ case '~': /* Go HOME */
+ goto end;
+ }
}
/* Toggle case-sensitivity */