Skip to content

Commit

Permalink
Open :Gcommit tab before current
Browse files Browse the repository at this point in the history
Pretty ridiculous, but this seems to be the only way to return to the
right tab after closing the commit message.
  • Loading branch information
tpope committed Jun 29, 2015
1 parent 1c84437 commit 0fbbe0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/fugitive.vim
Expand Up @@ -1055,7 +1055,7 @@ function! s:Commit(args, ...) abort
if bufname('%') == '' && line('$') == 1 && getline(1) == '' && !&mod
execute 'keepalt edit '.s:fnameescape(msgfile)
elseif a:args =~# '\%(^\| \)-\%(-verbose\|\w*v\)\>'
execute 'keepalt tabedit '.s:fnameescape(msgfile)
execute 'keepalt '.(tabpagenr()-1).'tabedit '.s:fnameescape(msgfile)
elseif s:buffer().type() ==# 'index'
execute 'keepalt edit '.s:fnameescape(msgfile)
execute (search('^#','n')+1).'wincmd+'
Expand Down

0 comments on commit 0fbbe0b

Please sign in to comment.