Fix crash using STop function

This commit is contained in:
Ben Jackson 2021-03-02 10:48:38 +00:00
commit d2b92b7ce5
2 changed files with 22 additions and 2 deletions

View file

@ -195,9 +195,9 @@ function! vimspector#Stop( ... ) abort
return
endif
if a:0 == 0
options = {}
let options = {}
else
options = a:1
let options = a:1
endif
py3 _vimspector_session.Stop( **vim.eval( 'options' ) )
endfunction

View file

@ -114,6 +114,26 @@ function! Test_Use_Mappings_HUMAN()
\ vimspector#test#signs#AssertPCIsAtLineInBuffer( 'simple.cpp', 9 )
\ } )
" Stop
call feedkeys( "\<F3>", 'xt' )
call WaitForAssert( {->
\ assert_equal( [],
\ getbufline( g:vimspector_session_windows.variables,
\ 1,
\ '$' ) )
\ } )
call WaitForAssert( {->
\ assert_equal( [],
\ getbufline( g:vimspector_session_windows.stack_trace,
\ 1,
\ '$' ) )
\ } )
call WaitForAssert( {->
\ assert_equal( [],
\ getbufline( g:vimspector_session_windows.watches,
\ 1,
\ '$' ) )
\ } )
call vimspector#test#setup#Reset()