mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-12-23 03:19:01 +00:00
[vim] Use lcd instead of chdir
https://github.com/junegunn/fzf.vim/issues/147
This commit is contained in:
parent
923feb69ab
commit
412c211655
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user