diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 9897274..c718420 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2489,7 +2489,7 @@ function! fugitive#Command(line1, line2, range, bang, mods, arg) abort endif let i += 1 endwhile - let editcmd = (a:line2 > 0 ? a:line2 : '') . (a:line2 ? 'split' : 'edit') + let editcmd = a:line2 ? 'split' : 'edit' if pager is# 1 if a:bang && a:line2 >= 0 let editcmd = 'read' @@ -2669,7 +2669,7 @@ function! s:StatusCommand(line1, line2, range, count, bang, mods, reg, arg, args elseif a:bang return mods . 'pedit' . arg . '|wincmd P' else - return mods . 'keepalt ' . (a:count > 0 ? a:count : '') . 'split' . arg + return mods . 'keepalt split' . arg endif catch /^fugitive:/ return 'echoerr ' . string(v:exception) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 94a657d..73e93d8 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -420,8 +420,8 @@ let s:addr_other = has('patch-8.1.560') ? '-addr=other' : '' let s:addr_tabs = has('patch-7.4.542') ? '-addr=tabs' : '' let s:addr_wins = has('patch-7.4.542') ? '-addr=windows' : '' -exe 'command! -bang -nargs=? -range=-1' s:addr_other '-complete=customlist,fugitive#Complete G exe fugitive#Command(, , +"", 0, "", )' -exe 'command! -bang -nargs=? -range=-1' s:addr_other '-complete=customlist,fugitive#Complete Git exe fugitive#Command(, , +"", 0, "", )' +command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#Complete G exe fugitive#Command(, , +"", 0, "", ) +command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#Complete Git exe fugitive#Command(, , +"", 0, "", ) if exists(':Gstatus') !=# 2 exe 'command! -bang -bar -range=-1' s:addr_other 'Gstatus exe fugitive#Command(, , +"", 0, "", )' @@ -429,7 +429,7 @@ endif for s:cmd in ['Commit', 'Revert', 'Merge', 'Rebase', 'Pull', 'Push', 'Fetch', 'Blame'] if exists(':G' . tolower(s:cmd)) != 2 - exe 'command! -bang -nargs=? -range=-1' s:addr_other '-complete=customlist,fugitive#' . s:cmd . 'Complete G' . tolower(s:cmd) 'exe fugitive#Command(, , +"", 0, "", "' . tolower(s:cmd) . ' " . )' + exe 'command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#' . s:cmd . 'Complete G' . tolower(s:cmd) 'exe fugitive#Command(, , +"", 0, "", "' . tolower(s:cmd) . ' " . )' endif endfor unlet s:cmd