summaryrefslogtreecommitdiff
path: root/menuconfig.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-10-21 07:06:52 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2018-10-21 07:09:56 +0200
commit516deb4d09b16d8c1492f8a1bc52a547d8f363e8 (patch)
tree109cfaec7011798a6fa026a83c3790081d1c0fb7 /menuconfig.py
parent79c5056a79e05b76521fe5d9686b6a44f50da8a1 (diff)
menuconfig: Show the selected symbol for promptless choices
If a choice is defined in multiple locations to add symbols, and show-all mode is turned on to reveal one of the promptless definitions, then it doesn't hurt to show the selected symbol next to it.
Diffstat (limited to 'menuconfig.py')
-rwxr-xr-xmenuconfig.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/menuconfig.py b/menuconfig.py
index 2693250..83c0915 100755
--- a/menuconfig.py
+++ b/menuconfig.py
@@ -2758,14 +2758,14 @@ def _node_str(node):
s += " (NEW)"
- if isinstance(node.item, Choice) and node.item.tri_value == 2:
- # Print the prompt of the selected symbol after the choice for
- # choices in y mode
- sym = node.item.selection
- if sym:
- for node_ in sym.nodes:
- if node_.prompt:
- s += " ({})".format(node_.prompt[0])
+ if isinstance(node.item, Choice) and node.item.tri_value == 2:
+ # Print the prompt of the selected symbol after the choice for
+ # choices in y mode
+ sym = node.item.selection
+ if sym:
+ for node_ in sym.nodes:
+ if node_.prompt:
+ s += " ({})".format(node_.prompt[0])
# Print "--->" next to nodes that have menus that can potentially be
# entered. Add "(empty)" if the menu is empty. We don't allow those to be