diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2017-08-09 01:54:01 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2017-08-09 01:54:01 +0900 |
| commit | 462c68b625e30964d24ef0d26b5e82169f506f0c (patch) | |
| tree | ad45e1b847696db59963403e6070417e92d0da68 /plugin/fzf.vim | |
| parent | 999d374f0ce609e1a1a747b5d931bcd9250586d5 (diff) | |
| download | fzf-462c68b625e30964d24ef0d26b5e82169f506f0c.tar.gz | |
[vim] Fix issues with other plugins changing working directory
Close #1005
Diffstat (limited to 'plugin/fzf.vim')
| -rw-r--r-- | plugin/fzf.vim | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 7e19f25c..f8955374 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -466,11 +466,11 @@ augroup fzf_popd augroup END function! s:dopopd() - if !exists('w:fzf_prev_dir') || exists('*haslocaldir') && !haslocaldir() + if !exists('w:fzf_dir') || s:fzf_getcwd() != w:fzf_dir[1] return endif - execute 'lcd' s:escape(w:fzf_prev_dir) - unlet w:fzf_prev_dir + execute 'lcd' s:escape(w:fzf_dir[0]) + unlet w:fzf_dir endfunction function! s:xterm_launcher() @@ -719,7 +719,7 @@ function! s:callback(dict, lines) abort let popd = has_key(a:dict, 'prev_dir') && \ (!&autochdir || (empty(a:lines) || len(a:lines) == 1 && empty(a:lines[0]))) if popd - let w:fzf_prev_dir = a:dict.prev_dir + let w:fzf_dir = [a:dict.prev_dir, a:dict.dir] endif try @@ -743,7 +743,7 @@ function! s:callback(dict, lines) abort " We may have opened a new window or tab if popd - let w:fzf_prev_dir = a:dict.prev_dir + let w:fzf_dir = [a:dict.prev_dir, a:dict.dir] call s:dopopd() endif endfunction |
