-
-
Notifications
You must be signed in to change notification settings - Fork 577
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
Using :Files causes window-local current directory to change #678
Comments
Can you describe why this is a problem? fzf can temporarily change the working directory using |
Thanks for the quick reply! Having a window-local working directory that is not purposeful (even if it is the same as the global working directory) can cause unexpected behavior. Here's a demonstration. Start with the following setup:
Then do the following steps:
Hope that explanation helps. Please let me know if you need any more info. I think that the following things should be restored perfectly by
|
Thanks for the explanation. I basically do not change directories within Vim, so this wasn't an issue to me. Is there a way to unset local directory? |
The only ways to unset the window-local directory that I'm aware of are:
|
I believe you can follow this pattern to restore all working directories to their previous state after using
|
Please update the main fzf repo and see if the problem is fixed for you. |
It works perfectly now. I ❤️ FZF! |
There is an issue with this when using tcd in neovim. If only tcd has been used to set the current directory of the tab then lcd shouldn't be used to override it. I'm never 100% sure which FZF command is doing it but I'll suddenly find one of my tabs is no longer using the correct directory. Tonight I narrowed it down to always happening with :Files which I don't normally use but it proved fzf.vim was doing this. |
To reproduce:
This bug exists on neovim
(NVIM v0.3.1)
but not vim(VIM - Vi IMproved 8.1 Included patches: 1-202)
Thanks for your help! Please let me know if you need any more information.
The text was updated successfully, but these errors were encountered: