Closed WhoIsSethDaniel closed 4 years ago
Oh my god, I don't even know keepalt
exists. Thanks.
Could you tell me a test case to be fixed by this change? I tried a scenario below in main branch and it seems to be working fine without your change:
:e foo.txt
:e bar.txt
" Open Vaffle
:Vaffle
" show alternate file
:b#
" it should show bar.txt
If you, say, launch Vaffle and then go up a directory the alternate file becomes incorrect. E.g.:
:e alternate.file :Vaffle :ls!
1 # "alternate.file" line 1
2 %a- "vaffle://0//home/seth/tmp" line 1
h :ls!
1 "alternate.file" line 1
2 %a- "vaffle://1//home/seth" line 6
3u# "vaffle://0//home/seth/tmp" line 1
And now the alternate file is the previous directory you were viewing and not the file that was being edited prior to entering Vaffle. This is unintuitive and not in keeping with other, similar tools such as netrw or dirvish.
This PR preserves the most recently edited file as the alternate file.
I understand, thank you for detailed explanation! Added a test case and merged.
Thank you for merging. I really like Vaffle!
This should resolve issue #49