mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 13:53:51 -05:00
Remove legacy autocommands
This commit is contained in:
@@ -1909,7 +1909,7 @@ function! fugitive#BufReadStatus() abort
|
|||||||
endfor
|
endfor
|
||||||
|
|
||||||
let b:fugitive_reltime = reltime()
|
let b:fugitive_reltime = reltime()
|
||||||
return 'silent ' . s:DoAutocmd('User FugitiveIndex')
|
return 'silent ' . s:DoAutocmd('User Fugitive') . '|silent ' . s:DoAutocmd('User FugitiveIndex')
|
||||||
catch /^fugitive:/
|
catch /^fugitive:/
|
||||||
return 'echoerr ' . string(v:exception)
|
return 'echoerr ' . string(v:exception)
|
||||||
endtry
|
endtry
|
||||||
@@ -6305,20 +6305,9 @@ function! fugitive#foldtext() abort
|
|||||||
return fugitive#Foldtext()
|
return fugitive#Foldtext()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
augroup fugitive_folding
|
|
||||||
autocmd!
|
|
||||||
autocmd User Fugitive
|
|
||||||
\ if &filetype =~# '^git\%(commit\)\=$' && &foldtext ==# 'foldtext()' |
|
|
||||||
\ set foldtext=fugitive#Foldtext() |
|
|
||||||
\ endif
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
" Section: Initialization
|
" Section: Initialization
|
||||||
|
|
||||||
function! fugitive#Init() abort
|
function! fugitive#Init() abort
|
||||||
if exists('#User#FugitiveBoot')
|
|
||||||
exe s:DoAutocmd('User FugitiveBoot')
|
|
||||||
endif
|
|
||||||
let dir = s:Dir()
|
let dir = s:Dir()
|
||||||
if &tags !~# '\.git' && @% !~# '\.git' && !exists('s:tags_warning')
|
if &tags !~# '\.git' && @% !~# '\.git' && !exists('s:tags_warning')
|
||||||
let actualdir = fugitive#Find('.git/', dir)
|
let actualdir = fugitive#Find('.git/', dir)
|
||||||
@@ -6329,7 +6318,6 @@ function! fugitive#Init() abort
|
|||||||
echohl NONE
|
echohl NONE
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
exe s:DoAutocmd('User Fugitive')
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! fugitive#is_git_dir(path) abort
|
function! fugitive#is_git_dir(path) abort
|
||||||
|
|||||||
@@ -357,6 +357,10 @@ augroup fugitive
|
|||||||
\ if len(FugitiveGitDir()) |
|
\ if len(FugitiveGitDir()) |
|
||||||
\ call fugitive#MapCfile('fugitive#MessageCfile()') |
|
\ call fugitive#MapCfile('fugitive#MessageCfile()') |
|
||||||
\ endif
|
\ endif
|
||||||
|
autocmd FileType git,gitcommit
|
||||||
|
\ if len(FugitiveGitDir()) && &foldtext ==# 'foldtext()' |
|
||||||
|
\ setlocal foldtext=fugitive#Foldtext() |
|
||||||
|
\ endif
|
||||||
autocmd FileType fugitive
|
autocmd FileType fugitive
|
||||||
\ if len(FugitiveGitDir()) |
|
\ if len(FugitiveGitDir()) |
|
||||||
\ call fugitive#MapCfile('fugitive#StatusCfile()') |
|
\ call fugitive#MapCfile('fugitive#StatusCfile()') |
|
||||||
|
|||||||
Reference in New Issue
Block a user