diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 272efcb..105cfe5 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -7156,6 +7156,9 @@ function! fugitive#BlameSyntax() abort return endif let seen = {} + for x in split('01234567890abcdef', '\zs') + exe 'syn match FugitiveblameHashGroup'.x '"\%(^\^\=[*?]*\)\@<='.x.'\x\{5,\}\>" nextgroup=FugitiveblameAnnotation,FugitiveblameOriginalLineNumber,fugitiveblameOriginalFile skipwhite' + endfor for lnum in range(1, line('$')) let orig_hash = matchstr(getline(lnum), '^\^\=[*?]*\zs\x\{6\}') let hash = orig_hash @@ -7177,8 +7180,8 @@ function! fugitive#BlameSyntax() abort else let s:hash_colors[hash] = '' endif - let pattern = substitute(orig_hash, '^\(\x\)\x\(\x\)\x\(\x\)\x$', '\1\\x\2\\x\3\\x', '') . '*\>' - exe 'syn match FugitiveblameHash'.hash.' "\%(^\^\=[*?]*\)\@<='.pattern.'" nextgroup=FugitiveblameAnnotation,FugitiveblameOriginalLineNumber,fugitiveblameOriginalFile skipwhite' + let pattern = substitute(orig_hash, '^\(\x\)\x\(\x\)\x\(\x\)\x$', '\1\\x\2\\x\3\\x', '') . '*' + exe 'syn match FugitiveblameHash'.hash.' "\%(^\^\=[*?]*\)\@<='.pattern.'" contained containedin=FugitiveblameHashGroup' . orig_hash[0] endfor syn match FugitiveblameUncommitted "\%(^\^\=[?*]*\)\@<=\<0\{7,\}\>" nextgroup=FugitiveblameAnnotation,FugitiveblameScoreDebug,FugitiveblameOriginalLineNumber,FugitiveblameOriginalFile skipwhite call s:BlameRehighlight()