-
-
Notifications
You must be signed in to change notification settings - Fork 576
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
When open a file with fzf, $PWD isn't changed #70
Comments
Thanks for the report. But I can't seem to reproduce the problem. Check if the problem is reproducible with the following config: call plug#begin('~/.vim/plugged')
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
call plug#end()
set autochdir vim -Nu <(curl https://gist.githubusercontent.com/junegunn/3db3e26b85c76f76d889/raw/e574dc52f47005f3fa2ad67d3bdb455b7d31d01e/gistfile1.txt) |
Yes, it's reproducible here. BTW, I'm using neovim 0.1.1, with |
Strange. Which command did you use? Please provide the exact steps to reproduce the issue. |
Note that |
@junegunn I found that only
|
Ah, I see what's going on. You'll see the same issue when you pass directory argument to This should be fixed in the main repo. |
The above commit should fix the problem. Thanks for the report. |
Hmm, let me check a few more things. |
When 'dir' option is passed to fzf#run(), the current working directory is temporarily changed to the given directory, and restored at the end. However, this behavior is not compatible with &autochdir. This commit introduces a heuristic to determine whether or not to restore the previous working directory. Related: junegunn/fzf.vim#70
It should work as expected now. |
I have
autochdir
option set. When I open a file usesplit
, or withctrlp
, $PWD is automatically changed as expected. But withfzf.vim
, it doesn't change.The text was updated successfully, but these errors were encountered: