Fix re-use of name result
This commit is contained in:
parent
5060b0821e
commit
361458534c
2 changed files with 10 additions and 5 deletions
|
|
@ -90,7 +90,7 @@ class OutputView( object ):
|
||||||
'Evaluated: ' + expression )
|
'Evaluated: ' + expression )
|
||||||
|
|
||||||
result = message[ 'body' ][ 'result' ]
|
result = message[ 'body' ][ 'result' ]
|
||||||
if message[ 'body' ].get( 'result' ) is None:
|
if result is None:
|
||||||
result = 'null'
|
result = 'null'
|
||||||
|
|
||||||
utils.AppendToBuffer( console, ' Result: ' + result )
|
utils.AppendToBuffer( console, ' Result: ' + result )
|
||||||
|
|
|
||||||
|
|
@ -294,9 +294,11 @@ class VariablesView( object ):
|
||||||
icon = '+' if ( result.get( 'variablesReference', 0 ) > 0 and
|
icon = '+' if ( result.get( 'variablesReference', 0 ) > 0 and
|
||||||
'_variables' not in result ) else '-'
|
'_variables' not in result ) else '-'
|
||||||
|
|
||||||
line = '{0}{1} Result: {2} '.format( ' ' * indent,
|
result_str = result[ 'result' ]
|
||||||
icon,
|
if result_str is None:
|
||||||
result[ 'result' ] )
|
result_str = 'null'
|
||||||
|
|
||||||
|
line = '{0}{1} Result: {2} '.format( ' ' * indent, icon, result_str )
|
||||||
line = utils.AppendToBuffer( self._watch.win.buffer, line.split( '\n' ) )
|
line = utils.AppendToBuffer( self._watch.win.buffer, line.split( '\n' ) )
|
||||||
self._watch.lines[ line ] = result
|
self._watch.lines[ line ] = result
|
||||||
|
|
||||||
|
|
@ -344,9 +346,12 @@ class VariablesView( object ):
|
||||||
# TODO: this result count be expandable, but we have no way to allow the
|
# TODO: this result count be expandable, but we have no way to allow the
|
||||||
# user to interact with the balloon to expand it.
|
# user to interact with the balloon to expand it.
|
||||||
body = message[ 'body' ]
|
body = message[ 'body' ]
|
||||||
|
result = body[ 'result' ]
|
||||||
|
if result is None:
|
||||||
|
result = 'null'
|
||||||
display = [
|
display = [
|
||||||
'Type: ' + body.get( 'type', '<unknown>' ),
|
'Type: ' + body.get( 'type', '<unknown>' ),
|
||||||
'Value: ' + body[ 'result' ]
|
'Value: ' + result
|
||||||
]
|
]
|
||||||
vim.eval( "balloon_show( {0} )".format(
|
vim.eval( "balloon_show( {0} )".format(
|
||||||
json.dumps( display ) ) )
|
json.dumps( display ) ) )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue