diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-05-22 11:35:46 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2018-05-22 11:45:18 +0200 |
| commit | 5104b1be4331c6b04b3aec0eab763d7dd1b2768b (patch) | |
| tree | 5a79aba9a6b6f8cdfa61d3bd0e3fd92d10540411 | |
| parent | 6392596b137baab59cee3ed4f8c408fe108a8a86 (diff) | |
menuconfig: Rearrange symbol name printing condition
The name is always shown for items without prompts (which are always
promptless symbols). Only show-name mode needs the symbol/choice check.
| -rwxr-xr-x | menuconfig.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/menuconfig.py b/menuconfig.py index be8c3d5..77b9d07 100755 --- a/menuconfig.py +++ b/menuconfig.py @@ -2180,9 +2180,10 @@ def _node_str(node): s = "{:{}}".format(_value_str(node), 3 + indent) # 'not node.prompt' can only be True in show-all mode - if (not node.prompt or _show_name) and \ - (isinstance(node.item, Symbol) or - (isinstance(node.item, Choice) and node.item.name)): + if not node.prompt or \ + (_show_name and + (isinstance(node.item, Symbol) or + (isinstance(node.item, Choice) and node.item.name))): s += " <{}>".format(node.item.name) |
