Do not pick multiple times in selection mode

This commit is contained in:
Arun Prakash Jana 2019-08-07 01:26:26 +05:30
parent 9a3786f94d
commit 8ea41dd0e5
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 7 additions and 4 deletions

View File

@ -3973,11 +3973,14 @@ nochange:
if (!ncp)
writecp(NULL, 0);
r = mkpath(path, dents[cur].name, newpath);
appendfpath(newpath, r);
/* Do not select if already selected */
if (!(dents[cur].flags & FILE_COPIED)) {
r = mkpath(path, dents[cur].name, newpath);
appendfpath(newpath, r);
++ncp;
dents[cur].flags |= FILE_COPIED;
++ncp;
dents[cur].flags |= FILE_COPIED;
}
/* move cursor to the next entry if this is not the last entry */
if (cur != ndents - 1)