Extract fugitiveblame ftplugin

References https://github.com/tpope/vim-fugitive/issues/1425
This commit is contained in:
Tim Pope
2021-03-24 19:54:47 -04:00
parent 5e5ce843ea
commit b2195e7690
2 changed files with 7 additions and 2 deletions

View File

@@ -5788,7 +5788,7 @@ function! s:BlameRehighlight() abort
endfor
endfunction
function! s:BlameFileType() abort
function! fugitive#BlameFileType() abort
setlocal nomodeline
setlocal foldmethod=manual
if len(s:Dir())
@@ -5821,7 +5821,6 @@ endfunction
augroup fugitive_blame
autocmd!
autocmd FileType fugitiveblame call s:BlameFileType()
autocmd ColorScheme,GUIEnter * call s:BlameRehighlight()
autocmd BufWinLeave * execute getwinvar(+bufwinnr(+expand('<abuf>')), 'fugitive_leave')
augroup END

View File

@@ -0,0 +1,6 @@
if exists("b:did_ftplugin") || !exists('*fugitive#BlameFileType')
finish
endif
let b:did_ftplugin = 1
call fugitive#BlameFileType()