Clear picker file on cancel

This commit is contained in:
Arun Prakash Jana 2018-11-29 20:35:41 +05:30
parent 04b0a38f68
commit 9876948a46
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -3394,7 +3394,12 @@ nochange:
if (sel == SEL_QUITCD) {
/* In vim picker mode, clear selection and exit */
if (cfg.picker) {
copybufpos = 0;
if (copybufpos) {
if (cfg.pickraw) /* Reset for for raw pick */
copybufpos = 0;
else /* Clear the picker file */
writecp(NULL, 0);
}
dentfree(dents);
return;
}