diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index c4b05ac..661f68e 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -3982,7 +3982,6 @@ endfunction augroup fugitive_blame autocmd! autocmd FileType fugitiveblame setlocal nomodeline | if len(s:Dir()) | let &l:keywordprg = s:Keywordprg() | endif - autocmd Syntax fugitiveblame call s:BlameSyntax() autocmd User Fugitive \ if get(b:, 'fugitive_type') =~# '^\%(file\|blob\|blame\)$' || filereadable(@%) | \ exe "command! -buffer -bar -bang -range=0 -nargs=* Gblame :execute s:BlameCommand(,,+'',,0,'',,,[])" | @@ -4206,8 +4205,7 @@ endfunction let s:hash_colors = {} -function! s:BlameSyntax() abort - let b:current_syntax = 'fugitiveblame' +function! fugitive#BlameSyntax() abort let conceal = has('conceal') ? ' conceal' : '' syn match FugitiveblameBoundary "^\^" syn match FugitiveblameBlank "^\s\+\s\@=" nextgroup=FugitiveblameAnnotation,fugitiveblameOriginalFile,FugitiveblameOriginalLineNumber skipwhite diff --git a/syntax/fugitiveblame.vim b/syntax/fugitiveblame.vim new file mode 100644 index 0000000..c06d19e --- /dev/null +++ b/syntax/fugitiveblame.vim @@ -0,0 +1,7 @@ +if exists("b:current_syntax") + finish +endif + +call fugitive#BlameSyntax() + +let b:current_syntax = "fugitiveblame"