Extend lazy detection to netrw

The requires dropping support for b:netrw_curdir, which was added in
fecd42864a for the vague reason of
handling "unusually named netrw buffers".  I'll figure out what to do
about those alleged buffers when one of them surfaces again.
This commit is contained in:
Tim Pope
2021-12-23 15:14:39 -05:00
parent b1c3cdffc9
commit b6dbb97759

View File

@@ -616,9 +616,8 @@ let g:io_fugitive = {
augroup fugitive augroup fugitive
autocmd! autocmd!
autocmd BufNewFile,BufReadPost * autocmd BufNewFile,BufReadPost * call FugitiveDetect(+expand('<abuf>'), 0)
\ call FugitiveDetect(+expand('<abuf>'), 0) autocmd FileType netrw call FugitiveDetect(+expand('<abuf>'), 0)
autocmd FileType netrw call FugitiveDetect(get(b:, 'netrw_curdir', +expand('<abuf>')), 1)
autocmd FileType git autocmd FileType git
\ call fugitive#MapCfile() \ call fugitive#MapCfile()