summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2016-06-02 22:24:47 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2016-06-02 22:24:47 +0900
commit412c2116556204d64d1f40afeb995cae1c5bfdcb (patch)
tree52cd78207cad3a5ce3ae5ec04baff01950e89c4d
parent923feb69ab80c63c49de114c6bcc5f8c48ef16d4 (diff)
[vim] Use lcd instead of chdir
https://github.com/junegunn/fzf.vim/issues/147
-rw-r--r--plugin/fzf.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index d6a79f35..16220bc5 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -193,7 +193,7 @@ function! s:pushd(dict)
return 1
endif
let a:dict.prev_dir = cwd
- execute 'chdir' s:escape(a:dict.dir)
+ execute 'lcd' s:escape(a:dict.dir)
let a:dict.dir = getcwd()
return 1
endif
@@ -214,7 +214,7 @@ function! s:popd(dict, lines)
" directory is not expected and should be undone.
if has_key(a:dict, 'prev_dir') &&
\ (!&autochdir || (empty(a:lines) || len(a:lines) == 1 && empty(a:lines[0])))
- execute 'chdir' s:escape(remove(a:dict, 'prev_dir'))
+ execute 'lcd' s:escape(remove(a:dict, 'prev_dir'))
endif
endfunction