mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-15 06:43:51 -05:00
Simplify tabedit invocation for :Gcommit -v
- `-tabedit` does the same thing as `(tabpagenr()-1).'tabedit'`
This commit is contained in:
@@ -1089,7 +1089,7 @@ function! s:Commit(args, ...) abort
|
|||||||
if bufname('%') == '' && line('$') == 1 && getline(1) == '' && !&mod
|
if bufname('%') == '' && line('$') == 1 && getline(1) == '' && !&mod
|
||||||
execute 'keepalt edit '.s:fnameescape(msgfile)
|
execute 'keepalt edit '.s:fnameescape(msgfile)
|
||||||
elseif a:args =~# '\%(^\| \)-\%(-verbose\|\w*v\)\>'
|
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'
|
elseif s:buffer().type() ==# 'index'
|
||||||
execute 'keepalt edit '.s:fnameescape(msgfile)
|
execute 'keepalt edit '.s:fnameescape(msgfile)
|
||||||
execute (search('^#','n')+1).'wincmd+'
|
execute (search('^#','n')+1).'wincmd+'
|
||||||
|
|||||||
Reference in New Issue
Block a user