aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-08-02 19:13:18 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-08-02 19:16:15 +0530
commit359b6f7a37292f3545da86fa3fb3866683227dfd (patch)
tree5200c4dc70071820d9e4d1b1725ab43b4e0c5b21 /src
parentd5e303beb77c39118e641b52d5460625096c3f54 (diff)
downloadnnn-359b6f7a37292f3545da86fa3fb3866683227dfd.tar.gz
Clear selection list after copy
Without this, there is a conflict with using the `-u` option (use selection). After copying selected files, the selection is intact and if the user issues a deletion next, the source files (meant for copying) are deleted.
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nnn.c b/src/nnn.c
index baeef06..336c0c1 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -1999,9 +1999,8 @@ static bool cpmvrm_selection(enum action sel, char *path)
return FALSE;
}
- /* Clear selection on move or delete */
- if (sel != SEL_CP)
- clearselection();
+ /* Clear selection */
+ clearselection();
return TRUE;
}