commit 078d05dc7a0e3ae331a4eaae07a644fe9cde56ee
parent 1014d941b14e805bc5f33d56e481f0cd1d9ff988
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date: Sun, 5 Apr 2020 14:42:32 +0530
Fix jump on canceled duplicate
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git 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;