mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Write last dir on quit in vim picker mode
This commit is contained in:
parent
defc1965ee
commit
e557bd2ed9
|
@ -6615,10 +6615,11 @@ nochange:
|
||||||
save_session(TRUE, NULL);
|
save_session(TRUE, NULL);
|
||||||
|
|
||||||
/* CD on Quit */
|
/* CD on Quit */
|
||||||
/* In vim picker mode, clear selection and exit */
|
if (sel == SEL_QUITCD || getenv("NNN_TMPFILE")) {
|
||||||
/* Picker mode: reset buffer or clear file */
|
write_lastdir(path);
|
||||||
if (sel == SEL_QUITCD || getenv("NNN_TMPFILE"))
|
if (g_state.picker)
|
||||||
g_state.picker ? selbufpos = 0 : write_lastdir(path);
|
selbufpos = 0;
|
||||||
|
}
|
||||||
return sel == SEL_QUITFAIL ? EXIT_FAILURE : EXIT_SUCCESS;
|
return sel == SEL_QUITFAIL ? EXIT_FAILURE : EXIT_SUCCESS;
|
||||||
#ifndef NOFIFO
|
#ifndef NOFIFO
|
||||||
case SEL_FIFO:
|
case SEL_FIFO:
|
||||||
|
|
Loading…
Reference in a new issue