Improve UI for watch window

Add a WinBar as the whole prompt buffer thing is not that well
undersood. Also allow you to delete a watch from any part of the
expression result too.
This commit is contained in:
Ben Jackson 2020-04-26 21:31:22 +01:00
commit 4586aa36ff
2 changed files with 30 additions and 7 deletions

View file

@ -97,8 +97,18 @@ function! vimspector#GoToFrame() abort
py3 _vimspector_session.ExpandFrameOrThread()
endfunction
function! vimspector#AddWatch( expr ) abort
py3 _vimspector_session.AddWatch( vim.eval( 'a:expr' ) )
function! vimspector#AddWatch( ... ) abort
if a:0 == 0
let expr = input( 'Enter watch expression: ' )
else
let expr = a:1
endif
if expr ==# ''
return
endif
py3 _vimspector_session.AddWatch( vim.eval( 'expr' ) )
endfunction
function! vimspector#AddWatchPrompt( expr ) abort