motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit 485251ec736c59d31544c8e431ab9cd8f44c7da8 (tree)
parent 50b57ba400335897c7f488bcb6478d096e65211a
Author: Tim Pope <code@tpope.net>
Date:   Tue,  6 Apr 2021 23:40:43 -0400

Provide "." and "<C-R><C-G>" in blame buffers

Diffstat:
Mautoload/fugitive.vim | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -1142,7 +1142,7 @@ function! fugitive#Object(...) abort let rev = '' endif let tree = s:Tree(dir) - let full = a:0 ? a:1 : @% + let full = a:0 ? a:1 : s:BufName('%') let full = fnamemodify(full, ':p' . (s:Slash(full) =~# '/$' ? '' : ':s?/$??')) if empty(rev) && empty(tree) return FugitiveGitPath(full) @@ -6043,6 +6043,7 @@ function! fugitive#BlameFileType() abort call s:Map('n', 'o', ':<C-U>exe <SID>BlameCommit("split")<CR>', '<silent>') call s:Map('n', 'O', ':<C-U>exe <SID>BlameCommit("tabedit")<CR>', '<silent>') call s:Map('n', 'p', ':<C-U>exe <SID>BlameCommit("pedit")<CR>', '<silent>') + call s:Map('n', '.', ":<C-U> <C-R>=substitute(<SID>BlameCommitFileLnum()[0],'^$','@','')<CR><Home>") endfunction augroup fugitive_blame