diff --git a/doc/fugitive.txt b/doc/fugitive.txt index e2ae323..a4944a1 100644 --- a/doc/fugitive.txt +++ b/doc/fugitive.txt @@ -171,7 +171,9 @@ that are part of Git repositories). to reblame at that commit's [count]th parent (like HEAD^[count]). Press o or O to open up that commit in a horizontal of vertical split. Pressing q will - close the blame buffer. + close the blame buffer, and pressing gq will close the + blame buffer and return the targeted window to the + work tree version. :[range]Gblame [flags] Run git-blame on the given range. diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 5cf0227..cbea6ab 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -1484,6 +1484,7 @@ function! s:Blame(bang,line1,line2,count,args) abort setlocal norelativenumber endif nnoremap q :exe substitute('bdelete'.bufwinnr(b:fugitive_blamed_bufnr).' wincmd w','-1','','') + nnoremap gq :exe substitute('bdelete'.bufwinnr(b:fugitive_blamed_bufnr).' wincmd wif expand("%:p") =~# "^fugitive:[\\/][\\/]"Geditendif','-1','','') nnoremap :exe BlameJump('') nnoremap P :exe BlameJump('^'.v:count1) nnoremap ~ :exe BlameJump('~'.v:count1)