mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 11:33:47 -05:00
Use :pedit for :Git! --paginate
This commit is contained in:
@@ -2456,14 +2456,20 @@ 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')
|
||||
if args[0] =~# '^-p$\|^--paginate$'
|
||||
call remove(args, 0)
|
||||
let pager = 1
|
||||
if a:bang && a:line2 == 0
|
||||
let editcmd .= '!'
|
||||
elseif a:bang
|
||||
let editcmd = 'pedit'
|
||||
endif
|
||||
else
|
||||
let pager = fugitive#PagerFor(args, config)
|
||||
endif
|
||||
if a:bang || pager is# 1
|
||||
return s:OpenExec((a:line2 > 0 ? a:line2 : '') . (a:line2 ? 'split' : 'edit'), a:mods, env, flags + args, dir) . after
|
||||
return s:OpenExec(editcmd, a:mods, env, flags + args, dir) . after
|
||||
endif
|
||||
if s:HasOpt(args, ['add', 'checkout', 'commit', 'stage', 'stash', 'reset'], '-p', '--patch') ||
|
||||
\ s:HasOpt(args, ['add', 'clean', 'stage'], '-i', '--interactive') ||
|
||||
|
||||
@@ -637,7 +637,7 @@ just one space character longer than the legacy version.
|
||||
*:Gvsplit!* Superseded by |:vert| |:Git| --paginate.
|
||||
*:Gtabsplit!* Superseded by |:tab| |:Git| --paginate.
|
||||
*:Gedit!* Superseded by :0Git --paginate.
|
||||
*:Gpedit!* Deprecated with no current plans for replacement.
|
||||
*:Gpedit!* Superseded by :Git! --paginate.
|
||||
|
||||
ABOUT *fugitive-about*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user