Raise autocommand when installer completes. use this in testing

This commit is contained in:
Ben Jackson 2020-07-21 19:11:31 +01:00
commit 0140a607b1
5 changed files with 84 additions and 24 deletions

View file

@ -146,6 +146,14 @@ function! vimspector#internal#job#Reset() abort
call vimspector#internal#job#StopDebugSession()
endfunction
function! s:_OnCommandExit( category, ch, code ) abort
py3 << EOF
from vimspector import utils as vimspector_utils
vimspector_utils.OnCommandWithLogComplete( vim.eval( 'a:category' ),
int( vim.eval( 'a:code' ) ) )
EOF
endfunction
function! vimspector#internal#job#StartCommandWithLog( cmd, category ) abort
if ! exists( 's:commands' )
let s:commands = {}
@ -165,8 +173,11 @@ function! vimspector#internal#job#StartCommandWithLog( cmd, category ) abort
\ 'out_io': 'buffer',
\ 'in_io': 'null',
\ 'err_io': 'buffer',
\ 'out_msg': 0,
\ 'err_msg': 0,
\ 'out_name': buf,
\ 'err_name': buf,
\ 'exit_cb': funcref( 's:_OnCommandExit', [ a:category ] ),
\ 'out_modifiable': 0,
\ 'err_modifiable': 0,
\ 'stoponexit': 'kill'