]> Sergey Matveev's repositories - nnn.git/commitdiff
On entry delete move to previous file
authorArun Prakash Jana <engineerarun@gmail.com>
Sun, 9 Dec 2018 18:39:05 +0000 (00:09 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sun, 9 Dec 2018 18:39:05 +0000 (00:09 +0530)
src/nnn.c

index f79a1bd41c19fa291722c03db4d0faf78aff753b..7706eeff382cb1484213374d4606403219c8c4ba 100644 (file)
--- 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;