-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: no alternate file #60
Comments
Here's a reproducible scenario where the alternate file is set appropriately:
However, I think this scenario, while it has an alternate file, sets it incorrectly:
Ideally in the second scenario this should happen:
|
The repro was very helpful, thanks! I added a test for that condition and made some changes until it passed. Can you see if it's working as expected now? |
This is working correctly. Thank you! |
I wasn't certain whether I should open a new bug or just reopen this bug. I have found two new scenarios where the alternate file goes missing.
In the above scenario if you navigate to a parent directory the alternate is saved, but once you navigate to any subdirectory of any other directory the alternate file is lost. However, if you then navigate to a parent directory the alternate file returns. Also this:
|
Thanks for the report! Those should be handled now as well |
I seem to have this issue (no alternate) when opening with |
@iovis if you're still seeing issues with this please file it with a repro as a new issue |
Did you check the docs and existing issues?
Neovim version (nvim -v)
v0.9.0-dev-1028+gd422fc827
Operating system/version
Ubuntu Kinetic
Describe the bug
Appears to be a regression of #43 and #20, perhaps.
I have a keymap of '-' to "require('oil').open". If I open a file, press '-' to get the file listing for the current directory, and then press C-6 (or C-^) I get an error: "No alternate file".
Steps To Reproduce
Expected Behavior
Pressing C-6 returns to previous file. This should be regardless of how many times I press '-' or use open(). I should be able to return from oil to my previous file by pressing C-6.
Directory structure
No response
Repro
Did you check the bug with a clean config?
nvim -u repro.lua
using the repro.lua file above.The text was updated successfully, but these errors were encountered: