From b6dbb977596639b603cb4f597cb139d5cc1b8a41 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 23 Dec 2021 15:14:39 -0500 Subject: [PATCH] Extend lazy detection to netrw The requires dropping support for b:netrw_curdir, which was added in fecd42864a4bb592d96af9f038475eea2163df58 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. --- plugin/fugitive.vim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 151ddf9..7d0836e 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -616,9 +616,8 @@ let g:io_fugitive = { augroup fugitive autocmd! - autocmd BufNewFile,BufReadPost * - \ call FugitiveDetect(+expand(''), 0) - autocmd FileType netrw call FugitiveDetect(get(b:, 'netrw_curdir', +expand('')), 1) + autocmd BufNewFile,BufReadPost * call FugitiveDetect(+expand(''), 0) + autocmd FileType netrw call FugitiveDetect(+expand(''), 0) autocmd FileType git \ call fugitive#MapCfile()