]> Sergey Matveev's repositories - nnn.git/commitdiff
Got to last dir on '~' or '/' key repeat
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 17 Apr 2021 14:55:58 +0000 (20:25 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 17 Apr 2021 14:55:58 +0000 (20:25 +0530)
src/nnn.c

index 250661f42730e0b3ea5440893f23b2d443c8cddf..19e32cfdc4493966efeacbc4a2d077b0d2e507b2 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -6329,9 +6329,12 @@ nochange:
                        }
 
                        if (strcmp(path, dir) == 0) {
-                               if (cfg.filtermode)
-                                       presel = FILTER;
-                               goto nochange;
+                               if (dir == ipath) {
+                                       if (cfg.filtermode)
+                                               presel = FILTER;
+                                       goto nochange;
+                               }
+                               dir = lastdir; /* Go to last dir on home/root key repeat */
                        }
 
                        if (chdir(dir) == -1) {