aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-02-13 13:28:18 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-02-13 13:28:18 +0530
commitaf35b8a27c95fb35c8624247c7b59ba726e7267e (patch)
tree9ff76901aff1a9760ab06afe5ace30d64d48aeda
parent19e5990d3aff82ba5cb0b309bf100bdbc05e722f (diff)
downloadnnn-af35b8a27c95fb35c8624247c7b59ba726e7267e.tar.gz
Start dir watch, preserve cur entry when navigate-as-you-type is disabled
-rw-r--r--nnn.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/nnn.c b/nnn.c
index b90776f..8347655 100644
--- a/nnn.c
+++ b/nnn.c
@@ -2733,11 +2733,14 @@ nochange:
cfg.filtermode ^= 1;
if (cfg.filtermode)
presel = FILTER;
- else if (!ndents)
- /* If there are no entries refresh to start watching dir */
+ else {
+ /* Save current */
+ if (ndents > 0)
+ copycurname();
+
+ /* Start watching the directory */
goto begin;
- else
- printmsg("navigate-as-you-type off");
+ }
goto nochange;
case SEL_SEARCH:
spawn(player, path, "search", NULL, F_NORMAL);