Reblame at HEAD from dirty lines

HEAD blame seems to be much more useful than index blame. You can
continue following evolution of the line with further jumps while before
you got struck on 'not yet committed' line if it was already added to
the index.
This commit is contained in:
Maksim Odnoletkov
2019-02-23 00:13:39 +00:00
committed by Tim Pope
parent b44b7b8ae7
commit ddd0513071

View File

@@ -3895,7 +3895,7 @@ function! s:BlameJump(suffix) abort
let commit = matchstr(getline('.'),'^\^\=\zs\x\+') let commit = matchstr(getline('.'),'^\^\=\zs\x\+')
let suffix = a:suffix let suffix = a:suffix
if commit =~# '^0\+$' if commit =~# '^0\+$'
let commit = ':0' let commit = 'HEAD'
let suffix = '' let suffix = ''
endif endif
let lnum = matchstr(getline('.'),' \zs\d\+\ze\s\+[([:digit:]]') let lnum = matchstr(getline('.'),' \zs\d\+\ze\s\+[([:digit:]]')