diff --git a/autoload/vimspector/internal/balloon.vim b/autoload/vimspector/internal/balloon.vim index b922397..86611f6 100644 --- a/autoload/vimspector/internal/balloon.vim +++ b/autoload/vimspector/internal/balloon.vim @@ -21,23 +21,6 @@ set cpoptions&vim scriptencoding utf-8 -" Returns: py.ShowBalloon( winnr, expresssion ) -function! vimspector#internal#balloon#BalloonExpr() abort - " winnr + 1 because for *no good reason* winnr is 0 based here unlike - " everywhere else - " int() because for *no good reason* winnr is a string. - return py3eval('_vimspector_session.ShowBalloon(' - \ . 'int( vim.eval( "v:beval_winnr" ) ) + 1,' - \ . 'vim.eval( "v:beval_text" ) )' ) -endfunction - -" Returns: py.ShowBalloon( winnr, expresssion ) -function! vimspector#internal#balloon#HoverTooltip() abort - return py3eval('_vimspector_session.ShowTooltip(int( vim.eval( "v:beval_winnr" ) ) + 1 ,vim.eval( "v:beval_text"), 1)') - -endfunction - - let s:float_win = 0 let s:nvim_related_win = 0 " diff --git a/python3/vimspector/debug_session.py b/python3/vimspector/debug_session.py index 18c4726..e6fff61 100644 --- a/python3/vimspector/debug_session.py +++ b/python3/vimspector/debug_session.py @@ -541,11 +541,11 @@ class DebugSession( object ): @IfConnected() def ShowTooltip( self, winnr, expression, is_hover ): - """Proxy: ballonexpr -> variables.ShowBallon""" + """Proxy: ballonexpr -> variables.ShowTooltip""" frame = self._stackTraceView.GetCurrentFrame() # Check if RIP is in a frame if frame is None: - self._logger.debug( 'Balloon: Not in a stack frame' ) + self._logger.debug( 'Tooltip: Not in a stack frame' ) return '' # Check if cursor in code window @@ -561,25 +561,6 @@ class DebugSession( object ): def _CleanUpTooltip( self ): return self._variablesView._CleanUpTooltip() - @IfConnected() - def ShowBalloon( self, winnr, expression ): - """Proxy: ballonexpr -> variables.ShowBallon""" - frame = self._stackTraceView.GetCurrentFrame() - # Check if RIP is in a frame - if frame is None: - self._logger.debug( 'Balloon: Not in a stack frame' ) - return '' - - # Check if cursor in code window - if winnr != int( self._codeView._window.number ): - self._logger.debug( 'Winnr %s is not the code window %s', - winnr, - self._codeView._window.number ) - return '' - - # Return variable aware function - return self._variablesView.ShowBalloon( frame, expression ) - @IfConnected() def ExpandFrameOrThread( self ): self._stackTraceView.ExpandFrameOrThread() diff --git a/python3/vimspector/variables.py b/python3/vimspector/variables.py index 7666954..c0cb2fd 100644 --- a/python3/vimspector/variables.py +++ b/python3/vimspector/variables.py @@ -616,43 +616,6 @@ class VariablesView( object ): draw() - def ShowBalloon( self, frame, expression ): - """Callback to display variable under cursor `:h ballonexpr`""" - if not self._connection: - return '' - - def handler( message ): - # TODO: this result count be expandable, but we have no way to allow the - # user to interact with the balloon to expand it, unless we use a popup - # instead, but even then we don't really want to trap the cursor. - body = message[ 'body' ] - result = body[ 'result' ] - if result is None: - result = 'null' - display = [ - 'Type: ' + body.get( 'type', '' ), - 'Value: ' + result - ] - utils.DisplayBalloon( self._is_term, display ) - - def failure_handler( reason, message ): - display = [ reason ] - utils.DisplayBalloon( self._is_term, display ) - - # Send async request - self._connection.DoRequest( handler, { - 'command': 'evaluate', - 'arguments': { - 'expression': expression, - 'frameId': frame[ 'id' ], - 'context': 'hover', - } - }, failure_handler ) - - # Return working (meanwhile) - return '...' - - def SetSyntax( self, syntax ): # TODO: Switch to View.syntax self._current_syntax = utils.SetSyntax( self._current_syntax,