Frame is not reqiured for evaluation
This commit is contained in:
parent
8d7de7172a
commit
b95fe20845
2 changed files with 14 additions and 10 deletions
|
|
@ -115,10 +115,6 @@ class OutputView( object ):
|
|||
self._ShowOutput( category )
|
||||
|
||||
def Evaluate( self, frame, expression ):
|
||||
if not frame:
|
||||
self.Print( 'Console', 'There is no current stack frame' )
|
||||
return
|
||||
|
||||
console = self._buffers[ 'Console' ].buf
|
||||
utils.AppendToBuffer( console, 'Evaluating: ' + expression )
|
||||
|
||||
|
|
@ -132,14 +128,18 @@ class OutputView( object ):
|
|||
|
||||
utils.AppendToBuffer( console, ' Result: ' + result )
|
||||
|
||||
self._connection.DoRequest( print_result, {
|
||||
request = {
|
||||
'command': 'evaluate',
|
||||
'arguments': {
|
||||
'expression': expression,
|
||||
'context': 'repl',
|
||||
'frameId': frame[ 'id' ],
|
||||
}
|
||||
} )
|
||||
}
|
||||
|
||||
if frame:
|
||||
request[ 'arguments' ][ 'frameId' ] = frame[ 'id' ]
|
||||
|
||||
self._connection.DoRequest( print_result, request )
|
||||
|
||||
def _ToggleFlag( self, category, flag ):
|
||||
if self._buffers[ category ].flag != flag:
|
||||
|
|
|
|||
|
|
@ -143,10 +143,12 @@ class VariablesView( object ):
|
|||
|
||||
def AddWatch( self, frame, expression ):
|
||||
watch = {
|
||||
'expression': expression,
|
||||
'frameId': frame[ 'id' ],
|
||||
'context': 'watch',
|
||||
'expression': expression,
|
||||
'context': 'watch',
|
||||
}
|
||||
if frame:
|
||||
watch[ 'frameId' ] = frame[ 'id' ]
|
||||
|
||||
self._watches.append( watch )
|
||||
self.EvaluateWatches()
|
||||
|
||||
|
|
@ -395,3 +397,5 @@ class VariablesView( object ):
|
|||
|
||||
with utils.LetCurrentWindow( self._watch.win ):
|
||||
vim.command( 'set syntax={}'.format( utils.Escape( syntax ) ) )
|
||||
|
||||
# vim: sw=2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue