From 412c2116556204d64d1f40afeb995cae1c5bfdcb Mon Sep 17 00:00:00 2001
From: Junegunn Choi <junegunn.c@gmail.com>
Date: Thu, 2 Jun 2016 22:24:47 +0900
Subject: [PATCH] [vim] Use lcd instead of chdir

https://github.com/junegunn/fzf.vim/issues/147
---
 plugin/fzf.vim | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index d6a79f35..16220bc5 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -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
 
-- 
GitLab