]> Sergey Matveev's repositories - nnn.git/commitdiff
Redraw if no entries when navigate-as-you-type is turned off
authorArun Prakash Jana <engineerarun@gmail.com>
Wed, 17 Jan 2018 14:52:07 +0000 (20:22 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Wed, 17 Jan 2018 14:52:07 +0000 (20:22 +0530)
The main reason to do this is to start watching the current dir for changes. In
any case, this does not harm; if there are dir entries shown on redraw that's
better than showing nothing.

nnn.c

diff --git a/nnn.c b/nnn.c
index fbbab8505debf0aedef2c490397cac6ce82e013d..2f9cc9f521068f303cf9b121b850d2060389dc36 100644 (file)
--- a/nnn.c
+++ b/nnn.c
@@ -2715,6 +2715,9 @@ nochange:
                        cfg.filtermode ^= 1;
                        if (cfg.filtermode)
                                presel = FILTER;
+                       else if (!ndents)
+                               /* If there are no entries refresh to start watching dir */
+                               goto begin;
                        else
                                printmsg("navigate-as-you-type off");
                        goto nochange;