mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-12-23 11:29: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
|
return 1
|
||||||
endif
|
endif
|
||||||
let a:dict.prev_dir = cwd
|
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()
|
let a:dict.dir = getcwd()
|
||||||
return 1
|
return 1
|
||||||
endif
|
endif
|
||||||
@ -214,7 +214,7 @@ function! s:popd(dict, lines)
|
|||||||
" directory is not expected and should be undone.
|
" directory is not expected and should be undone.
|
||||||
if has_key(a:dict, 'prev_dir') &&
|
if has_key(a:dict, 'prev_dir') &&
|
||||||
\ (!&autochdir || (empty(a:lines) || len(a:lines) == 1 && empty(a:lines[0])))
|
\ (!&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
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user