From 0ac4915cd7c5dcbf142526a71b4a3c25290ebed7 Mon Sep 17 00:00:00 2001 From: Quinn Strahl Date: Thu, 14 Apr 2016 18:50:34 -0400 Subject: [PATCH] Simplify tabedit invocation for :Gcommit -v - `-tabedit` does the same thing as `(tabpagenr()-1).'tabedit'` --- plugin/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index d9f316f..9a2f97b 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -1089,7 +1089,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 '.(tabpagenr()-1).'tabedit '.s:fnameescape(msgfile) + execute 'keepalt -tabedit '.s:fnameescape(msgfile) elseif s:buffer().type() ==# 'index' execute 'keepalt edit '.s:fnameescape(msgfile) execute (search('^#','n')+1).'wincmd+'