mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 14:23: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
|
||||
let mytab = tabpagenr()
|
||||
let mybufnr = bufnr('')
|
||||
let args = s:ArgSplit(a:arg)
|
||||
let after = ''
|
||||
if get(args, 0) =~# '^+'
|
||||
let after = '|' . remove(args, 0)[1:-1]
|
||||
endif
|
||||
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:/
|
||||
return 'echoerr ' . string(v:exception)
|
||||
endtry
|
||||
@@ -5183,7 +5188,7 @@ function! fugitive#WriteCommand(line1, line2, range, bang, mods, arg, args) abor
|
||||
endfor
|
||||
endfor
|
||||
call fugitive#ReloadStatus(-1, 1)
|
||||
return 'checktime'
|
||||
return 'silent checktime' . after
|
||||
endfunction
|
||||
|
||||
function! fugitive#WqCommand(...) abort
|
||||
|
||||
Reference in New Issue
Block a user