From 0b46af4d03aa1935796d0ce474ad9bceb46b2aed Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Sat, 25 Aug 2018 02:02:16 +0200 Subject: menuconfig: Don't return when selecting a choice symbol with children If a symbol depends on a choice symbol that immediately precedes it, it's put into an implicit submenu and not considered a choice symbol. Don't immediately return to the parent menu when selecting such a symbol. It makes the children hard to spot. This is used (or was... not sure if it still is) in a single Kconfig file in the kernel. It's completely undocumented. --- menuconfig.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'menuconfig.py') diff --git a/menuconfig.py b/menuconfig.py index fca3cf3..ee79864 100755 --- a/menuconfig.py +++ b/menuconfig.py @@ -434,9 +434,12 @@ def _menuconfig(stdscr): else: _change_node(sel_node) - if _is_y_mode_choice_sym(sel_node.item): + if _is_y_mode_choice_sym(sel_node.item) and not sel_node.list: # Immediately jump to the parent menu after making a choice - # selection, like 'make menuconfig' does + # selection, like 'make menuconfig' does, except if the + # menu node has children (which can happen if a symbol + # 'depends on' a choice symbol that immediately precedes + # it). _leave_menu() elif c in ("n", "N"): -- cgit v1.2.3