Allow VimspectorShowOutput with no argument

This commit is contained in:
Ben Jackson 2020-07-27 22:49:13 +01:00
commit d86b42bf5b
2 changed files with 7 additions and 3 deletions

View file

@ -188,11 +188,15 @@ function! vimspector#EvaluateConsole( expr ) abort
py3 _vimspector_session.EvaluateConsole( vim.eval( 'a:expr' ) ) py3 _vimspector_session.EvaluateConsole( vim.eval( 'a:expr' ) )
endfunction endfunction
function! vimspector#ShowOutput( category ) abort function! vimspector#ShowOutput( ... ) abort
if !s:enabled if !s:enabled
return return
endif endif
py3 _vimspector_session.ShowOutput( vim.eval( 'a:category' ) ) if a:0 == 1
py3 _vimspector_session.ShowOutput( vim.eval( 'a:1' ) )
else
py3 _vimspector_session.ShowOutput( 'Console' )
endif
endfunction endfunction
function! vimspector#ShowOutputInWindow( win_id, category ) abort function! vimspector#ShowOutputInWindow( win_id, category ) abort

View file

@ -88,7 +88,7 @@ endif
command! -bar -nargs=1 -complete=custom,vimspector#CompleteExpr command! -bar -nargs=1 -complete=custom,vimspector#CompleteExpr
\ VimspectorWatch \ VimspectorWatch
\ call vimspector#AddWatch( <f-args> ) \ call vimspector#AddWatch( <f-args> )
command! -bar -nargs=1 -complete=custom,vimspector#CompleteOutput command! -bar -nargs=? -complete=custom,vimspector#CompleteOutput
\ VimspectorShowOutput \ VimspectorShowOutput
\ call vimspector#ShowOutput( <f-args> ) \ call vimspector#ShowOutput( <f-args> )
command! -bar -nargs=1 -complete=custom,vimspector#CompleteExpr command! -bar -nargs=1 -complete=custom,vimspector#CompleteExpr