mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 05:43:52 -05:00
Temporarily restore User Fugitive autocommand
References https://github.com/tpope/vim-fugitive/issues/1441
This commit is contained in:
@@ -2052,7 +2052,7 @@ function! fugitive#BufReadStatus() abort
|
||||
endfor
|
||||
|
||||
let b:fugitive_reltime = reltime()
|
||||
return 'silent ' . s:DoAutocmd('User Fugitive') . '|silent ' . s:DoAutocmd('User FugitiveIndex')
|
||||
return 'silent ' . s:DoAutocmd('User FugitiveIndex')
|
||||
catch /^fugitive:/
|
||||
return 'echoerr ' . string(v:exception)
|
||||
endtry
|
||||
|
||||
@@ -279,6 +279,23 @@ function! FugitiveDetect(path) abort
|
||||
let b:git_dir = dir
|
||||
endif
|
||||
endif
|
||||
if !exists('b:git_dir') || !exists('#User#Fugitive')
|
||||
return ''
|
||||
endif
|
||||
if v:version >= 704 || (v:version == 703 && has('patch442'))
|
||||
doautocmd <nomodeline> User Fugitive
|
||||
elseif &modelines > 0
|
||||
let modelines = &modelines
|
||||
try
|
||||
set modelines=0
|
||||
doautocmd User Fugitive
|
||||
finally
|
||||
let &modelines = modelines
|
||||
endtry
|
||||
else
|
||||
doautocmd User Fugitive
|
||||
endif
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function! FugitiveVimPath(path) abort
|
||||
|
||||
Reference in New Issue
Block a user