diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 166ca0f..0a0a160 100644 --- 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', ':exe BlameCommit("split")', '') call s:Map('n', 'O', ':exe BlameCommit("tabedit")', '') call s:Map('n', 'p', ':exe BlameCommit("pedit")', '') + call s:Map('n', '.', ": =substitute(BlameCommitFileLnum()[0],'^$','@','')") endfunction augroup fugitive_blame