Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion menuconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,15 @@ def _leave_menu():
# Jump to parent menu
parent = _parent_menu(_cur_menu)
_shown = _shown_nodes(parent)
_sel_node_i = _shown.index(_cur_menu)

if _cur_menu in _shown:
_sel_node_i = _shown.index(_cur_menu)
else:
# The current menu is not visible in the parent menu. This can happen
# when a choice with an associated symbol is extended somewhere
# else by an invisible one. In this case, point to node at index 0.
_sel_node_i = 0

_cur_menu = parent
Copy link
Collaborator

@tejlmand tejlmand Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for not noticing in first round, but why are you removing this line ?

    _cur_menu = parent

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, sorry that shouldn't be the case. I accidentally removed it in the last change. I'll add it back.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


# Try to make the menu entry appear on the same row on the screen as it did
Expand Down