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.
This commit is contained in:
riyu ken 2017-09-28 21:04:01 +08:00 committed by Jason Franklin
parent 5782b228e4
commit 8a6ae7c633

View File

@ -21,7 +21,7 @@ function! s:NERDTree.changeRoot(node)
"change dir to the dir of the new root if instructed to "change dir to the dir of the new root if instructed to
if g:NERDTreeChDirMode ==# 2 if g:NERDTreeChDirMode ==# 2
exec "cd " . self.root.path.str({'format': 'Edit'}) call self.root.path.changeToDir()
endif endif
call self.render() call self.render()