Use NERDTree.root instead of removed NERDTreeRoot

As of scrooloose/nerdtree@d36b793, it was recommended to use
NERDTree.root instead of deprecated NERDTreeRoot. Also, this command
seems to be recently removed since it was throwing an Undefined
variable: b:NERDTreeRoot when starting Vim.
This commit is contained in:
Carlos Coelho 2017-11-14 10:58:31 -03:00 committed by Tim Pope
parent d16cd9ced1
commit de6c05720c

View File

@ -241,7 +241,7 @@ augroup fugitive
autocmd!
autocmd BufNewFile,BufReadPost * call fugitive#detect(expand('%:p'))
autocmd FileType netrw call fugitive#detect(expand('%:p'))
autocmd User NERDTreeInit,NERDTreeNewRoot call fugitive#detect(b:NERDTreeRoot.path.str())
autocmd User NERDTreeInit,NERDTreeNewRoot call fugitive#detect(b:NERDTree.root.path.str())
autocmd VimEnter * if expand('<amatch>')==''|call fugitive#detect(getcwd())|endif
autocmd CmdWinEnter * call fugitive#detect(expand('#:p'))
autocmd BufWinLeave * execute getwinvar(+bufwinnr(+expand('<abuf>')), 'fugitive_leave')