While using menuconfig, if one searches for MY_OPT3 and jumps to the symbol the choice menu will be displayed. If then one tries to leave the menu, an exception is raised, as the parent menu (top menu in this case) does not actually display the current menu.
Steps to reproduce
Using the snippet above, run menuconfig
Press / ('Jump to symbol') and search for MY_OPT3
Jump to the symbol (pressing Enter)
Leave the menu (pressing Esc)
Expected results
The Sub menu is displayed.
Actual results
An exception is raised and the program stops:
Traceback (most recent call last):
File "/home/leandro/.local/bin/menuconfig", line 10, in <module>
sys.exit(_main())
File "/home/leandro/.local/lib/python3.7/site-packages/menuconfig.py", line 631, in _main
menuconfig(standard_kconfig())
File "/home/leandro/.local/lib/python3.7/site-packages/menuconfig.py", line 700, in menuconfig
print(curses.wrapper(_menuconfig))
File "/usr/lib/python3.7/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/home/leandro/.local/lib/python3.7/site-packages/menuconfig.py", line 859, in _menuconfig
_leave_menu()
File "/home/leandro/.local/lib/python3.7/site-packages/menuconfig.py", line 1174, in _leave_menu
_sel_node_i = _shown.index(_cur_menu)
ValueError: <menu node for choice MY_CHOICE, deps y, has child, Kconfig:21> is not in list
Description
When a choice is given an associated symbol, it can have multiple definitions, so the options could be extended like so:
While using menuconfig, if one searches for
MY_OPT3
and jumps to the symbol the choice menu will be displayed. If then one tries to leave the menu, an exception is raised, as the parent menu (top menu in this case) does not actually display the current menu.Steps to reproduce
/
('Jump to symbol') and search forMY_OPT3
Enter
)Esc
)Expected results
The
Sub
menu is displayed.Actual results
An exception is raised and the program stops: