mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-12-23 03:19:01 +00:00
[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.
This commit is contained in:
parent
6e08fe337c
commit
b18db4733c
@ -201,7 +201,7 @@ function! s:pushd(dict)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:popd(dict)
|
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'))
|
execute 'chdir '.s:escape(remove(a:dict, 'prev_dir'))
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
Reference in New Issue
Block a user