mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-15 06:43:51 -05:00
Support :Gwrite +aftercommand
Closes https://github.com/tpope/vim-fugitive/pull/562
This commit is contained in:
@@ -5067,8 +5067,13 @@ function! fugitive#WriteCommand(line1, line2, range, bang, mods, arg, args) abor
|
|||||||
endif
|
endif
|
||||||
let mytab = tabpagenr()
|
let mytab = tabpagenr()
|
||||||
let mybufnr = bufnr('')
|
let mybufnr = bufnr('')
|
||||||
|
let args = s:ArgSplit(a:arg)
|
||||||
|
let after = ''
|
||||||
|
if get(args, 0) =~# '^+'
|
||||||
|
let after = '|' . remove(args, 0)[1:-1]
|
||||||
|
endif
|
||||||
try
|
try
|
||||||
let file = len(a:arg) ? s:Generate(s:Expand(a:arg)) : fugitive#Real(@%)
|
let file = len(args) ? s:Generate(s:Expand(join(args, ' '))) : fugitive#Real(@%)
|
||||||
catch /^fugitive:/
|
catch /^fugitive:/
|
||||||
return 'echoerr ' . string(v:exception)
|
return 'echoerr ' . string(v:exception)
|
||||||
endtry
|
endtry
|
||||||
@@ -5183,7 +5188,7 @@ function! fugitive#WriteCommand(line1, line2, range, bang, mods, arg, args) abor
|
|||||||
endfor
|
endfor
|
||||||
endfor
|
endfor
|
||||||
call fugitive#ReloadStatus(-1, 1)
|
call fugitive#ReloadStatus(-1, 1)
|
||||||
return 'checktime'
|
return 'silent checktime' . after
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! fugitive#WqCommand(...) abort
|
function! fugitive#WqCommand(...) abort
|
||||||
|
|||||||
Reference in New Issue
Block a user