mirror of
https://github.com/tpope/vim-fugitive.git
synced 2026-10-08 21:15:23 +08:00
Guard against future NERDTree API changes
This commit is contained in:
1 parent
0a75ec5d9b
commit
65a53b5f5c
1 file changed
+4
-1
+4
-1
@@ -156,7 +156,10 @@ augroup fugitive
|
||||
|
||||
autocmd BufNewFile,BufReadPost * call FugitiveDetect(expand('%:p'))
|
||||
autocmd FileType netrw call FugitiveDetect(fnamemodify(get(b:, 'netrw_curdir', @%), ':p'))
|
||||
autocmd User NERDTreeInit,NERDTreeNewRoot call FugitiveDetect(b:NERDTree.root.path.str())
|
||||
autocmd User NERDTreeInit,NERDTreeNewRoot
|
||||
\ if exists('b:NERDTree.root.path.str') |
|
||||
\ call FugitiveDetect(b:NERDTree.root.path.str()) |
|
||||
\ endif
|
||||
autocmd VimEnter * if expand('<amatch>')==''|call FugitiveDetect(getcwd())|endif
|
||||
autocmd CmdWinEnter * call FugitiveDetect(expand('#:p'))
|
||||
|
||||
|
||||
Reference in new issue
Block a user