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 )
|
||||
|
||||
result = message[ 'body' ][ 'result' ]
|
||||
if message[ 'body' ].get( 'result' ) is None:
|
||||
if result is None:
|
||||
result = 'null'
|
||||
|
||||
utils.AppendToBuffer( console, ' Result: ' + result )
|
||||
|
|
|
|||
|
|
@ -294,9 +294,11 @@ class VariablesView( object ):
|
|||
icon = '+' if ( result.get( 'variablesReference', 0 ) > 0 and
|
||||
'_variables' not in result ) else '-'
|
||||
|
||||
line = '{0}{1} Result: {2} '.format( ' ' * indent,
|
||||
icon,
|
||||
result[ 'result' ] )
|
||||
result_str = result[ 'result' ]
|
||||
if result_str is None:
|
||||
result_str = 'null'
|
||||
|
||||
line = '{0}{1} Result: {2} '.format( ' ' * indent, icon, result_str )
|
||||
line = utils.AppendToBuffer( self._watch.win.buffer, line.split( '\n' ) )
|
||||
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
|
||||
# user to interact with the balloon to expand it.
|
||||
body = message[ 'body' ]
|
||||
result = body[ 'result' ]
|
||||
if result is None:
|
||||
result = 'null'
|
||||
display = [
|
||||
'Type: ' + body.get( 'type', '<unknown>' ),
|
||||
'Value: ' + body[ 'result' ]
|
||||
'Value: ' + result
|
||||
]
|
||||
vim.eval( "balloon_show( {0} )".format(
|
||||
json.dumps( display ) ) )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue