aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-08-07 00:51:54 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-08-07 00:51:54 +0530
commit9a3786f94d7c72ff71291fa9a06a97ab92639af5 (patch)
tree943ec13d043c5322f33c0c7bd40bf02014b5dd27
parent68b460310e181326b1ea6457b26b4153b96c92b1 (diff)
downloadnnn-9a3786f94d7c72ff71291fa9a06a97ab92639af5.tar.gz
Auto-proceed to next entry in selection mode
-rw-r--r--src/nnn.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 37e8760..e1a8c11 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -3977,6 +3977,11 @@ nochange:
appendfpath(newpath, r);
++ncp;
+ dents[cur].flags |= FILE_COPIED;
+
+ /* move cursor to the next entry if this is not the last entry */
+ if (cur != ndents - 1)
+ move_cursor((cur + 1) % ndents, 0);
} else {
r = mkpath(path, dents[cur].name, newpath);
@@ -3990,9 +3995,9 @@ nochange:
writecp(newpath, r - 1); /* Truncate NULL from end */
spawn(copier, NULL, NULL, NULL, F_NOTRACE);
- }
- dents[cur].flags |= FILE_COPIED;
+ dents[cur].flags |= FILE_COPIED;
+ }
break;
case SEL_COPYMUL:
cfg.copymode ^= 1;