From e24d0a465994e34b13bc6ff6413027d158851da8 Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Wed, 8 Jul 2020 11:45:20 +0100 Subject: [PATCH] Simplify extracting the result from a WatchResult --- python3/vimspector/variables.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/python3/vimspector/variables.py b/python3/vimspector/variables.py index a29251f..20ae0d0 100644 --- a/python3/vimspector/variables.py +++ b/python3/vimspector/variables.py @@ -412,16 +412,12 @@ class VariablesView( object ): icon = '+' if ( watch.result.IsExpandable() and not watch.result.IsExpandedByUser() ) else '-' - result_str = watch.result.result[ 'result' ] - if result_str is None: - result_str = '' - line = '{indent}{marker}{icon} Result: {result}'.format( # We borrow 1 space of indent to draw the change marker indent = ' ' * ( indent - 1 ), marker = '*' if watch.result.changed else ' ', icon = icon, - result = result_str ) + result = watch.result.result.get( 'result', '' ) ) line = utils.AppendToBuffer( self._watch.win.buffer, line.split( '\n' ) ) self._watch.lines[ line ] = watch.result