mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-16 15:23:51 -05:00
Drop support for :{windowheight}Git
Ever since Vim gained -addr=, it's been impossible to define a command
that accepts both marks like '< (requires -addr=lines) an and a count
that's beyond the end of the file (requires -addr=other). This means
:Git needs to pick sides between :'<,'>Git blame and :{windowheight}Git
log, and the former is much more important than the latter.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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(<line1>, <count>, +"<range>", <bang>0, "<mods>", <q-args>)'
|
||||
exe 'command! -bang -nargs=? -range=-1' s:addr_other '-complete=customlist,fugitive#Complete Git exe fugitive#Command(<line1>, <count>, +"<range>", <bang>0, "<mods>", <q-args>)'
|
||||
command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#Complete G exe fugitive#Command(<line1>, <count>, +"<range>", <bang>0, "<mods>", <q-args>)
|
||||
command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#Complete Git exe fugitive#Command(<line1>, <count>, +"<range>", <bang>0, "<mods>", <q-args>)
|
||||
|
||||
if exists(':Gstatus') !=# 2
|
||||
exe 'command! -bang -bar -range=-1' s:addr_other 'Gstatus exe fugitive#Command(<line1>, <count>, +"<range>", <bang>0, "<mods>", <q-args>)'
|
||||
@@ -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(<line1>, <count>, +"<range>", <bang>0, "<mods>", "' . tolower(s:cmd) . ' " . <q-args>)'
|
||||
exe 'command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#' . s:cmd . 'Complete G' . tolower(s:cmd) 'exe fugitive#Command(<line1>, <count>, +"<range>", <bang>0, "<mods>", "' . tolower(s:cmd) . ' " . <q-args>)'
|
||||
endif
|
||||
endfor
|
||||
unlet s:cmd
|
||||
|
||||
Reference in New Issue
Block a user