commit 8a6ae7c6338378b6bb28ad0cf03e71ff0fd11a5a
parent 5782b228e495c733af4ba2e547e5dc44ebc8bc25
Author: riyu ken <dahantianzi@gmail.com>
Date: Thu, 28 Sep 2017 21:04:01 +0800
Use a better function to change directories
When g:NERDTreeChDirMode is 2, changing the tree root will change the working
directory as well. This change was silent because the wrong function was used to
make the switch. This commit uses a better function that echoes a message.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/nerdtree/nerdtree.vim b/lib/nerdtree/nerdtree.vim
@@ -21,7 +21,7 @@ function! s:NERDTree.changeRoot(node)
"change dir to the dir of the new root if instructed to
if g:NERDTreeChDirMode ==# 2
- exec "cd " . self.root.path.str({'format': 'Edit'})
+ call self.root.path.changeToDir()
endif
call self.render()