diff options
author | Martin Roa Villescas <m.roa.villescas@tue.nl> | 2020-08-01 18:35:13 +0200 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2020-08-01 22:53:27 +0530 |
commit | e557bd2ed90db94e21eb9b192e955fde8aa53e4e (patch) | |
tree | bfee36d73c2f067e1f56aa2c5907c0d1641f6855 /src | |
parent | defc1965eeb8586b9325aa73731f15c389109a76 (diff) | |
download | nnn-e557bd2ed90db94e21eb9b192e955fde8aa53e4e.tar.gz |
Write last dir on quit in vim picker mode
Diffstat (limited to 'src')
-rw-r--r-- | src/nnn.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -6615,10 +6615,11 @@ nochange: save_session(TRUE, NULL); /* CD on Quit */ - /* In vim picker mode, clear selection and exit */ - /* Picker mode: reset buffer or clear file */ - if (sel == SEL_QUITCD || getenv("NNN_TMPFILE")) - g_state.picker ? selbufpos = 0 : write_lastdir(path); + if (sel == SEL_QUITCD || getenv("NNN_TMPFILE")) { + write_lastdir(path); + if (g_state.picker) + selbufpos = 0; + } return sel == SEL_QUITFAIL ? EXIT_FAILURE : EXIT_SUCCESS; #ifndef NOFIFO case SEL_FIFO: |