mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 11:33:47 -05:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user