From: Arun Prakash Jana <engineerarun@gmail.com>
Date: Sat, 29 Feb 2020 01:02:02 +0000 (+0530)
Subject: Continue in filter mode
X-Git-Tag: v3.1~123
X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=a1e2ef055eb0853ea5b0189860351b6d40dd118c;p=nnn.git

Continue in filter mode
---

diff --git a/src/nnn.c b/src/nnn.c
index 0a7aa708..ab125fe4 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -5372,8 +5372,11 @@ nochange:
 				goto nochange;
 			}
 
-			if (strcmp(path, dir) == 0)
+			if (strcmp(path, dir) == 0) {
+				if (cfg.filtermode)
+					presel = FILTER;
 				goto nochange;
+			}
 
 			/* SEL_CDLAST: dir pointing to lastdir */
 			xstrlcpy(newpath, dir, PATH_MAX);
@@ -6053,8 +6056,11 @@ nochange:
 #endif
 				if (tmp && *tmp) // NOLINT
 					prompt_run(tmp, (ndents ? dents[cur].name : ""), path);
-				else
+				else {
+					if (cfg.filtermode)
+						presel = FILTER;
 					goto nochange;
+				}
 			}
 
 			/* Continue in navigate-as-you-type mode, if enabled */
@@ -6100,6 +6106,8 @@ nochange:
 			goto nochange;
 		case SEL_AUTONEXT:
 			g_states ^= STATE_AUTONEXT;
+			if (cfg.filtermode)
+				presel = FILTER;
 			goto nochange;
 		case SEL_QUITCTX: // fallthrough
 		case SEL_QUITCD: // fallthrough