diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2020-08-02 19:13:18 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2020-08-02 19:16:15 +0530 |
commit | 359b6f7a37292f3545da86fa3fb3866683227dfd (patch) | |
tree | 5200c4dc70071820d9e4d1b1725ab43b4e0c5b21 | |
parent | d5e303beb77c39118e641b52d5460625096c3f54 (diff) | |
download | nnn-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.
-rw-r--r-- | nnn.1 | 2 | ||||
-rw-r--r-- | src/nnn.c | 5 |
2 files changed, 3 insertions, 4 deletions
@@ -412,7 +412,7 @@ separated by \fI;\fR: # codes: 0-black, 1-red, 2-green, 3-yellow, 4-blue (default), 5-magenta, 6-cyan, 7-white export NNN_COLORS='1234' - # xterm 256 color codes (in hex) + # xterm 256 color codes (in hex, 2 symbols per context) # codes: https://upload.wikimedia.org/wikipedia/commons/1/15/Xterm_256color_chart.svg export NNN_COLORS='#0a1b2c3d' @@ -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; } |