aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nnn.c b/src/nnn.c
index f79a1bd..7706eef 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -3199,7 +3199,11 @@ nochange:
mkpath(path, dents[cur].name, newpath, PATH_MAX);
spawn("rm", rm_opts, newpath, NULL, F_NORMAL | F_SIGINT);
+ if (cur && access(newpath, F_OK) == -1)
+ --cur;
+
copycurname();
+
if (cfg.filtermode)
presel = FILTER;
goto begin;