Skip to content
Myr

[vim] Use lcd instead of chdir

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

https://github.com/junegunn/fzf.vim/issues/147

authored by Junegunn Choi · committed by Junegunn Choi · parent 923feb6 · Browse files · 1 file+2 added−2 removed
This commit

State

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

Trailers

  • https: //github.com/junegunn/fzf.vim/issues/147

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:plugin/fzf.vim+2 added-2 removed
191 unmodified lines
192 if get(a:dict, 'prev_dir', '') ==# cwd193 return 1194 endif195 let a:dict.prev_dir = cwd196 execute 'chdir' s:escape(a:dict.dir)196 execute 'lcd' s:escape(a:dict.dir)197 let a:dict.dir = getcwd()198 return 1199 endif200 return 0
12 unmodified lines
213 " without a match. In these cases, we presume that the change of the214 " directory is not expected and should be undone.215 if has_key(a:dict, 'prev_dir') &&216 \ (!&autochdir || (empty(a:lines) || len(a:lines) == 1 && empty(a:lines[0])))217 execute 'chdir' s:escape(remove(a:dict, 'prev_dir'))217 execute 'lcd' s:escape(remove(a:dict, 'prev_dir'))218 endif219endfunction220221function! s:xterm_launcher()
248 unmodified lines