]> Sergey Matveev's repositories - nnn.git/commitdiff
Do not optimize cur on rm if in filter mode
authorArun Prakash Jana <engineerarun@gmail.com>
Fri, 1 Feb 2019 03:42:36 +0000 (09:12 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Fri, 1 Feb 2019 03:42:50 +0000 (09:12 +0530)
src/nnn.c

index 9a8ea37847949610826415d4b40b8c41c2d351e0..23dbb345bc54b2a17a9f3756bf3c10e7effa8baf 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -3495,7 +3495,8 @@ nochange:
                        mkpath(path, dents[cur].name, newpath);
                        spawn("rm", rm_opts, newpath, NULL, F_NORMAL | F_SIGINT);
 
-                       if (cur && access(newpath, F_OK) == -1)
+                       /* Don't optimize cur if filtering is on */
+                       if (!cfg.filtermode && cur && access(newpath, F_OK) == -1)
                                --cur;
 
                        copycurname();