aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-02-01 09:12:36 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-02-01 09:12:50 +0530
commit8080b6dd679627186cdaeef0fa12aebbd416a682 (patch)
treeae377de2a64edbb115797b0840c726985481da98
parentba088196f621f6df4abd4aec64ed7fd5a4cbbbf9 (diff)
downloadnnn-8080b6dd679627186cdaeef0fa12aebbd416a682.tar.gz
Do not optimize cur on rm if in filter mode
-rw-r--r--src/nnn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 9a8ea37..23dbb34 100644
--- 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();