From 516deb4d09b16d8c1492f8a1bc52a547d8f363e8 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Sun, 21 Oct 2018 07:06:52 +0200 Subject: 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. --- menuconfig.py | 16 ++++++++-------- 1 file 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 -- cgit v1.2.3