motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit 03710a877a737b3ce5929cf321ca7bc324031eb3 (tree)
parent b4d40abb10c8011ed02e93fdba47ea4e5c6e59f7
Author: Tim Pope <code@tpope.net>
Date:   Mon, 12 Aug 2019 00:10:16 -0400

Use same window for commit message on :0Gcommit

Diffstat:
Mautoload/fugitive.vim | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -3302,7 +3302,7 @@ function! s:CommitSubcommand(line1, line2, range, bang, mods, args, ...) abort call insert(argv, '--cleanup=strip') endif call extend(argv, ['-F', msgfile], 'keep') - if bufname('%') == '' && line('$') == 1 && getline(1) == '' && !&modified + if (bufname('%') == '' && line('$') == 1 && getline(1) == '' && !&modified) || a:line2 == 0 execute mods . 'keepalt edit' s:fnameescape(msgfile) elseif s:HasOpt(argv, '-v') || mods =~# '\<tab\>' execute mods . 'keepalt -tabedit' s:fnameescape(msgfile) @@ -3375,8 +3375,8 @@ function! s:FinishCommit() abort return '' endfunction -call s:command("-nargs=? -complete=customlist,s:CommitComplete Gcommit", "commit") -call s:command("-nargs=? -complete=customlist,s:RevertComplete Grevert", "revert") +call s:command("-nargs=? -range=-1 -complete=customlist,s:CommitComplete Gcommit", "commit") +call s:command("-nargs=? -range=-1 -complete=customlist,s:RevertComplete Grevert", "revert") " Section: :Gmerge, :Grebase, :Gpull