Skip to content
Myr

[vim] Do not restore working directory on unexpected cwd

Before adoption: this commit came in with the history the project adopted, so no landing records it.

We should not restore the previous working directory if the current directory has changed somehow. This can happen when &autochdir is set.

authored by Junegunn Choi · committed by Junegunn Choi · parent 6e08fe3 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:plugin/fzf.vim+1 added-1 removed
199 unmodified lines
200 return 0201endfunction202203function! s:popd(dict)204 if has_key(a:dict, 'prev_dir')204 if has_key(a:dict, 'prev_dir') && getcwd() ==# a:dict.dir205 execute 'chdir '.s:escape(remove(a:dict, 'prev_dir'))206 endif207endfunction208
242 unmodified lines