Merge pull request #366 from puremourning/fix-stop

Fix crash using Stop function
This commit is contained in:
mergify[bot] 2021-03-02 11:28:07 +00:00 • committed by GitHub
commit 4cb4b814a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 2 deletions

View file

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

View file

@ -114,6 +114,26 @@ function! Test_Use_Mappings_HUMAN()
\ vimspector#test#signs#AssertPCIsAtLineInBuffer( 'simple.cpp', 9 ) \ 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() call vimspector#test#setup#Reset()