mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
checkpatch fix: refactor cd on quit
This commit is contained in:
parent
59a5db2c90
commit
d37b67b77b
10
src/nnn.c
10
src/nnn.c
|
@ -3952,12 +3952,10 @@ nochange:
|
||||||
if (sel == SEL_QUITCD) {
|
if (sel == SEL_QUITCD) {
|
||||||
/* In vim picker mode, clear selection and exit */
|
/* In vim picker mode, clear selection and exit */
|
||||||
if (cfg.picker) {
|
if (cfg.picker) {
|
||||||
if (copybufpos) {
|
/* Picker mode: reset buffer or clear file */
|
||||||
if (cfg.pickraw) /* Reset for for raw pick */
|
if (copybufpos)
|
||||||
copybufpos = 0;
|
cfg.pickraw ? copybufpos = 0 : writecp(NULL, 0);
|
||||||
else /* Clear the picker file */
|
|
||||||
writecp(NULL, 0);
|
|
||||||
}
|
|
||||||
dentfree(dents);
|
dentfree(dents);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue