From 0fbbe0b3a44b807c4f9c4c5649f83d4dcb9e23f5 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 29 Jun 2015 17:52:39 -0400 Subject: [PATCH] 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. --- plugin/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 96dfa23..2adb3ac 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -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+'