mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 13:53:51 -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
|
endfor
|
||||||
|
|
||||||
let b:fugitive_reltime = reltime()
|
let b:fugitive_reltime = reltime()
|
||||||
return 'silent ' . s:DoAutocmd('User Fugitive') . '|silent ' . s:DoAutocmd('User FugitiveIndex')
|
return 'silent ' . s:DoAutocmd('User FugitiveIndex')
|
||||||
catch /^fugitive:/
|
catch /^fugitive:/
|
||||||
return 'echoerr ' . string(v:exception)
|
return 'echoerr ' . string(v:exception)
|
||||||
endtry
|
endtry
|
||||||
|
|||||||
@@ -279,6 +279,23 @@ function! FugitiveDetect(path) abort
|
|||||||
let b:git_dir = dir
|
let b:git_dir = dir
|
||||||
endif
|
endif
|
||||||
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
|
endfunction
|
||||||
|
|
||||||
function! FugitiveVimPath(path) abort
|
function! FugitiveVimPath(path) abort
|
||||||
|
|||||||
Reference in New Issue
Block a user