Remove more text from the hover popup
This commit is contained in:
parent
64e38b57ab
commit
0b4da4c82b
1 changed files with 16 additions and 10 deletions
|
|
@ -297,12 +297,8 @@ class VariablesView( object ):
|
||||||
self._current_syntax,
|
self._current_syntax,
|
||||||
view.buf )
|
view.buf )
|
||||||
|
|
||||||
utils.AppendToBuffer(
|
|
||||||
view.buf,
|
|
||||||
f"Expression: { watch.expression[ 'expression' ] }" )
|
|
||||||
|
|
||||||
self._DrawWatchResult( view,
|
self._DrawWatchResult( view,
|
||||||
2,
|
0,
|
||||||
watch,
|
watch,
|
||||||
is_short = True )
|
is_short = True )
|
||||||
|
|
||||||
|
|
@ -554,15 +550,25 @@ class VariablesView( object ):
|
||||||
if not watch.result:
|
if not watch.result:
|
||||||
return
|
return
|
||||||
|
|
||||||
assert indent > 0
|
assert is_short or indent > 0
|
||||||
|
|
||||||
|
if is_short:
|
||||||
|
# The first result is always expanded in a hover (short format)
|
||||||
|
icon = ''
|
||||||
|
marker = ''
|
||||||
|
leader = ''
|
||||||
|
else:
|
||||||
icon = '+' if ( watch.result.IsExpandable() and
|
icon = '+' if ( watch.result.IsExpandable() and
|
||||||
not watch.result.IsExpanded() ) else '-'
|
not watch.result.IsExpanded() ) else '-'
|
||||||
|
marker = '*' if watch.result.changed else ' ',
|
||||||
|
leader = ' Result: '
|
||||||
|
|
||||||
line = '{indent}{marker}{icon} Result: {result}'.format(
|
line = '{indent}{marker}{icon}{leader}{result}'.format(
|
||||||
# We borrow 1 space of indent to draw the change marker
|
# We borrow 1 space of indent to draw the change marker
|
||||||
indent = ' ' * ( indent - 1 ),
|
indent = ' ' * ( indent - 1 ),
|
||||||
marker = '*' if watch.result.changed else ' ',
|
marker = marker,
|
||||||
icon = icon,
|
icon = icon,
|
||||||
|
leader = leader,
|
||||||
result = watch.result.result.get( 'result', '<unknown>' ) )
|
result = watch.result.result.get( 'result', '<unknown>' ) )
|
||||||
|
|
||||||
line = utils.AppendToBuffer( view.buf, line.split( '\n' ) )
|
line = utils.AppendToBuffer( view.buf, line.split( '\n' ) )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue