Fix missing :Gblame in work tree files

Closes https://github.com/tpope/vim-fugitive/issues/1066
This commit is contained in:
Tim Pope
2018-07-27 08:54:18 -04:00
parent 4b0475f9d8
commit cec05fac01

View File

@@ -2286,7 +2286,7 @@ augroup fugitive_blame
autocmd FileType fugitiveblame setlocal nomodeline | if exists('b:git_dir') | let &l:keywordprg = s:Keywordprg() | endif autocmd FileType fugitiveblame setlocal nomodeline | if exists('b:git_dir') | let &l:keywordprg = s:Keywordprg() | endif
autocmd Syntax fugitiveblame call s:BlameSyntax() autocmd Syntax fugitiveblame call s:BlameSyntax()
autocmd User Fugitive autocmd User Fugitive
\ if get(b:, 'fugitive_type') =~# '^\%(file\|blob\|blame\)$' | \ if get(b:, 'fugitive_type') =~# '^\%(file\|blob\|blame\)$' || filereadable(@%) |
\ exe "command! -buffer -bar -bang -range=0 -nargs=* Gblame :execute s:Blame(<bang>0,<line1>,<line2>,<count>,'<mods>',[<f-args>])" | \ exe "command! -buffer -bar -bang -range=0 -nargs=* Gblame :execute s:Blame(<bang>0,<line1>,<line2>,<count>,'<mods>',[<f-args>])" |
\ endif \ endif
autocmd ColorScheme,GUIEnter * call s:RehighlightBlame() autocmd ColorScheme,GUIEnter * call s:RehighlightBlame()