We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 121c88e + 5fb7123 commit 915e7bcCopy full SHA for 915e7bc
menuconfig.py
@@ -1207,7 +1207,14 @@ def _leave_menu():
1207
# Jump to parent menu
1208
parent = _parent_menu(_cur_menu)
1209
_shown = _shown_nodes(parent)
1210
- _sel_node_i = _shown.index(_cur_menu)
+
1211
+ try:
1212
+ _sel_node_i = _shown.index(_cur_menu)
1213
+ except ValueError:
1214
+ # The parent actually does not contain the current menu (e.g., symbol
1215
+ # search). So we jump to the first node instead.
1216
+ _sel_node_i = 0
1217
1218
_cur_menu = parent
1219
1220
# Try to make the menu entry appear on the same row on the screen as it did
0 commit comments