aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-04-05 14:42:32 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-04-05 14:42:32 +0530
commit078d05dc7a0e3ae331a4eaae07a644fe9cde56ee (patch)
tree14195bbcc98ccab2202aeefa0e7a72dce4e2acd4
parent1014d941b14e805bc5f33d56e481f0cd1d9ff988 (diff)
downloadnnn-078d05dc7a0e3ae331a4eaae07a644fe9cde56ee.tar.gz
Fix jump on canceled duplicate
-rw-r--r--src/nnn.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nnn.c b/src/nnn.c
index d542169..f4224a1 100644
--- 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;