Invert flag for lazy initialization

I think this second argument might become an optional buffer number at
some point, so change the special value for lazy to an invalid buffer
number.
This commit is contained in:
Tim Pope
2021-09-19 07:52:53 -04:00
parent a67e1f8189
commit bb89a7a497

View File

@@ -420,7 +420,7 @@ function! FugitiveDetect(...) abort
if exists('b:git_dir') && b:git_dir =~# '^$\|' . s:bad_git_dir
unlet b:git_dir
endif
if a:0 > 1 && a:2 && !exists('#User#Fugitive')
if a:0 > 1 && a:2 is# 0 && !exists('#User#Fugitive')
return ''
endif
if !exists('b:git_dir')
@@ -604,7 +604,7 @@ augroup fugitive
autocmd!
autocmd BufNewFile,BufReadPost *
\ call FugitiveDetect(expand('<amatch>:p'), 1)
\ call FugitiveDetect(expand('<amatch>:p'), 0)
autocmd FileType netrw call FugitiveDetect(fnamemodify(get(b:, 'netrw_curdir', expand('<afile>:p')), ':p'), 1)
autocmd FileType git