]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix jump on canceled duplicate
authorArun Prakash Jana <engineerarun@gmail.com>
Sun, 5 Apr 2020 09:12:32 +0000 (14:42 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sun, 5 Apr 2020 09:12:32 +0000 (14:42 +0530)
src/nnn.c

index d5421695d56cfd99118186bf6944213f2ef43b56..f4224a14438cac29b1ae1fb827f41585acd32bd1 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -6042,9 +6042,11 @@ nochange:
                                /* Skip renaming to same name */
                                if (strcmp(tmp, dents[cur].name) == 0) {
                                        tmp = xreadline(dents[cur].name, messages[MSG_COPY_NAME]);
-                                       if (strcmp(tmp, dents[cur].name) == 0)
+                                       if (!tmp || !tmp[0] || !strcmp(tmp, dents[cur].name)) {
+                                               cfg.filtermode ?  presel = FILTER : statusbar(path);
+                                               copycurname();
                                                goto nochange;
-
+                                       }
                                        ret = 'd';
                                }
                                break;