diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2016-01-11 18:17:13 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2016-01-11 18:17:13 +0900 |
| commit | b18db4733c635705b3aa052efe91472432727c58 (patch) | |
| tree | ffe3da3130934a315f47dfcec3a2311e299eedcf /plugin | |
| parent | 6e08fe337cf90cd6eb4734000fe6da1d37184014 (diff) | |
| download | fzf-b18db4733c635705b3aa052efe91472432727c58.tar.gz | |
[vim] Do not restore working directory on unexpected cwd
We should not restore the previous working directory if the current
directory has changed somehow. This can happen when &autochdir is set.
Diffstat (limited to 'plugin')
| -rw-r--r-- | plugin/fzf.vim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 89f1b21e..8dc5b8a1 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -201,7 +201,7 @@ function! s:pushd(dict) endfunction function! s:popd(dict) - if has_key(a:dict, 'prev_dir') + if has_key(a:dict, 'prev_dir') && getcwd() ==# a:dict.dir execute 'chdir '.s:escape(remove(a:dict, 'prev_dir')) endif endfunction |
