Handle unusually named netrw buffers

This commit is contained in:
Tim Pope 2018-05-31 18:43:09 -04:00
parent 01e7a7e1e6
commit fecd42864a

View File

@ -276,7 +276,7 @@ endfunction
augroup fugitive
autocmd!
autocmd BufNewFile,BufReadPost * call FugitiveDetect(expand('%:p'))
autocmd FileType netrw 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 VimEnter * if expand('<amatch>')==''|call FugitiveDetect(getcwd())|endif
autocmd CmdWinEnter * call FugitiveDetect(expand('#:p'))