1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 17:30:04 +08:00

fix(git): clear std_data when restart command

This commit is contained in:
wsdjeg 2022-10-27 00:50:24 +08:00
parent 6aa0877e0c
commit ed17f52bbb

View File

@ -11,6 +11,10 @@ let s:NOTI = SpaceVim#api#import('notify')
function! git#push#run(...) abort function! git#push#run(...) abort
let s:NOTI.notify_max_width = float2nr( &columns * 0.3) let s:NOTI.notify_max_width = float2nr( &columns * 0.3)
let s:std_data = {
\ 'stderr' : [],
\ 'stdout' : [],
\ }
let cmd = ['git', 'push'] let cmd = ['git', 'push']
if len(a:1) > 0 if len(a:1) > 0
let cmd += a:1 let cmd += a:1
@ -51,10 +55,6 @@ endfunction
" "
" why git push normal info to stderr " why git push normal info to stderr
let s:std_data = {
\ 'stderr' : [],
\ 'stdout' : [],
\ }
function! s:on_stderr(id, data, event) abort function! s:on_stderr(id, data, event) abort
call extend(s:std_data.stderr, a:data) call extend(s:std_data.stderr, a:data)
endfunction endfunction