diff options
| author | 2019-08-07 01:26:26 +0530 | |
|---|---|---|
| committer | 2019-08-07 01:27:22 +0530 | |
| commit | 8ea41dd0e51f42f1c4b53b335ca843ae001acc39 (patch) | |
| tree | fc8545cca816a94324f188ff7b2d82b7bd7149fd /src | |
| parent | 9a3786f94d7c72ff71291fa9a06a97ab92639af5 (diff) | |
| download | nnn-8ea41dd0e51f42f1c4b53b335ca843ae001acc39.tar.gz | |
Do not pick multiple times in selection mode
Diffstat (limited to 'src')
| -rw-r--r-- | src/nnn.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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) |