mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-15 06:43:51 -05:00
Retire old :Gsplit! family of temp buffer commands
This commit is contained in:
@@ -4545,9 +4545,10 @@ function! s:OpenExec(cmd, mods, env, args, ...) abort
|
|||||||
return 'echo ' . string(':!' . s:UserCommand(options, a:args))
|
return 'echo ' . string(':!' . s:UserCommand(options, a:args))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
let s:bang_edits = {'split': 'Git', 'vsplit': 'vert Git', 'tabedit': 'tab Git', 'pedit': 'Git!'}
|
||||||
function! fugitive#Open(cmd, bang, mods, arg, args) abort
|
function! fugitive#Open(cmd, bang, mods, arg, args) abort
|
||||||
if a:bang
|
if a:bang
|
||||||
return s:OpenExec(a:cmd, a:mods, {}, s:SplitExpand(a:arg, s:Tree()))
|
return 'echoerr ' . string(':G' . a:cmd . '! for temp buffer output has been replaced by :' . get(s:bang_edits, a:cmd, 'Git') . ' --paginate')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let mods = s:Mods(a:mods)
|
let mods = s:Mods(a:mods)
|
||||||
@@ -4595,9 +4596,7 @@ endfunction
|
|||||||
|
|
||||||
function! fugitive#ReadCommand(line1, count, range, bang, mods, arg, args) abort
|
function! fugitive#ReadCommand(line1, count, range, bang, mods, arg, args) abort
|
||||||
if a:bang
|
if a:bang
|
||||||
let dir = s:Dir()
|
return 'echoerr ' . string(':Gread! for temp buffer output has been replaced by :{range}Git! --paginate')
|
||||||
let args = s:SplitExpand(a:arg, s:Tree(dir))
|
|
||||||
return s:ReadExec(a:line1, a:count, a:range, a:mods, {}, args, {'dir': dir})
|
|
||||||
endif
|
endif
|
||||||
let [read, post] = s:ReadPrepare(a:line1, a:count, a:range, a:mods)
|
let [read, post] = s:ReadPrepare(a:line1, a:count, a:range, a:mods)
|
||||||
try
|
try
|
||||||
|
|||||||
Reference in New Issue
Block a user