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.
This commit is contained in:
Arun Prakash Jana 2020-08-02 19:13:18 +05:30
parent d5e303beb7
commit 359b6f7a37
No known key found for this signature in database
GPG key ID: A75979F35C080412
2 changed files with 3 additions and 4 deletions

2
nnn.1
View file

@ -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 # codes: 0-black, 1-red, 2-green, 3-yellow, 4-blue (default), 5-magenta, 6-cyan, 7-white
export NNN_COLORS='1234' 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 # codes: https://upload.wikimedia.org/wikipedia/commons/1/15/Xterm_256color_chart.svg
export NNN_COLORS='#0a1b2c3d' export NNN_COLORS='#0a1b2c3d'

View file

@ -1999,8 +1999,7 @@ static bool cpmvrm_selection(enum action sel, char *path)
return FALSE; return FALSE;
} }
/* Clear selection on move or delete */ /* Clear selection */
if (sel != SEL_CP)
clearselection(); clearselection();
return TRUE; return TRUE;