Open :Gcommit tab before current

Pretty ridiculous, but this seems to be the only way to return to the
right tab after closing the commit message.
This commit is contained in:
Tim Pope 2015-06-29 17:52:39 -04:00
parent 1c844375fa
commit 0fbbe0b3a4

View File

@ -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+'