From: Arun Prakash Jana Date: Tue, 6 Aug 2019 19:21:54 +0000 (+0530) Subject: Auto-proceed to next entry in selection mode X-Git-Tag: v2.7~170 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=9a3786f94d7c72ff71291fa9a06a97ab92639af5;p=nnn.git Auto-proceed to next entry in selection mode --- diff --git a/src/nnn.c b/src/nnn.c index 37e87605..e1a8c11f 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;