Restore spacing (don't waste a whole column); re-use one of the indent columns for the marker
This commit is contained in:
parent
c43f16e288
commit
8143992345
1 changed files with 6 additions and 2 deletions
|
|
@ -342,11 +342,13 @@ class VariablesView( object ):
|
||||||
} )
|
} )
|
||||||
|
|
||||||
def _DrawVariables( self, view, variables, indent ):
|
def _DrawVariables( self, view, variables, indent ):
|
||||||
|
assert indent > 0
|
||||||
for variable in variables:
|
for variable in variables:
|
||||||
line = utils.AppendToBuffer(
|
line = utils.AppendToBuffer(
|
||||||
view.win.buffer,
|
view.win.buffer,
|
||||||
'{indent}{marker}{icon} {name} ({type_}): {value}'.format(
|
'{indent}{marker}{icon} {name} ({type_}): {value}'.format(
|
||||||
indent = ' ' * indent,
|
# We borrow 1 space of indent to draw the change marker
|
||||||
|
indent = ' ' * ( indent - 1 ),
|
||||||
marker = '*' if variable.changed else ' ',
|
marker = '*' if variable.changed else ' ',
|
||||||
icon = '+' if ( variable.IsExpandable()
|
icon = '+' if ( variable.IsExpandable()
|
||||||
and not variable.IsExpandedByUser() ) else '-',
|
and not variable.IsExpandedByUser() ) else '-',
|
||||||
|
|
@ -406,6 +408,7 @@ class VariablesView( object ):
|
||||||
if not watch.result:
|
if not watch.result:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
assert indent > 0
|
||||||
icon = '+' if ( watch.result.IsExpandable() and
|
icon = '+' if ( watch.result.IsExpandable() and
|
||||||
not watch.result.IsExpandedByUser() ) else '-'
|
not watch.result.IsExpandedByUser() ) else '-'
|
||||||
|
|
||||||
|
|
@ -414,7 +417,8 @@ class VariablesView( object ):
|
||||||
result_str = '<unknown>'
|
result_str = '<unknown>'
|
||||||
|
|
||||||
line = '{indent}{marker}{icon} Result: {result}'.format(
|
line = '{indent}{marker}{icon} Result: {result}'.format(
|
||||||
indent = ' ' * indent,
|
# We borrow 1 space of indent to draw the change marker
|
||||||
|
indent = ' ' * ( indent - 1 ),
|
||||||
marker = '*' if watch.result.changed else ' ',
|
marker = '*' if watch.result.changed else ' ',
|
||||||
icon = icon,
|
icon = icon,
|
||||||
result = result_str )
|
result = result_str )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue