summaryrefslogtreecommitdiff
path: root/menuconfig.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-08-25 02:02:16 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2018-08-25 02:03:12 +0200
commit0b46af4d03aa1935796d0ce474ad9bceb46b2aed (patch)
tree2d2d59d30eede51101d3f3e48fbfd5626eab1959 /menuconfig.py
parent17d7c1e38f0380ea63784f438bd7ec2625f299b4 (diff)
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.
Diffstat (limited to 'menuconfig.py')
-rwxr-xr-xmenuconfig.py7
1 files changed, 5 insertions, 2 deletions
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"):