diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index c6f4c86..259e979 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -1123,7 +1123,9 @@ function! s:Blame(bang,line1,line2,count) abort execute "vertical resize ".(match(getline('.'),'\s\+\d\+)')+1) setlocal nomodified nomodifiable nonumber scrollbind nowrap foldcolumn=0 nofoldenable filetype=fugitiveblame nnoremap q :bdelete - nnoremap :exe BlameJump() + nnoremap :exe BlameJump('') + nnoremap P :exe BlameJump('^'.v:count1) + nnoremap ~ :exe BlameJump('~'.v:count1) nnoremap o :exe Edit((&splitbelow ? "botright" : "topleft")." split", matchstr(getline('.'),'\x\+')) nnoremap O :exe Edit("tabedit", matchstr(getline('.'),'\x\+')) syncbind @@ -1139,7 +1141,7 @@ function! s:Blame(bang,line1,line2,count) abort endtry endfunction -function! s:BlameJump() abort +function! s:BlameJump(suffix) abort let commit = matchstr(getline('.'),'^\^\=\zs\x\+') if commit =~# '^0\+$' let commit = ':0' @@ -1155,7 +1157,7 @@ function! s:BlameJump() abort if winnr > 0 exe winnr.'wincmd w' endif - execute s:Edit('edit',commit.':'.path) + execute s:Edit('edit',commit.a:suffix.':'.path) if winnr > 0 exe bufnr.'bdelete' endif