Incomplete call menus when using default or timeout#185
Open
nbe95 wants to merge 1 commit intoarnonym:nextfrom
Open
Incomplete call menus when using default or timeout#185nbe95 wants to merge 1 commit intoarnonym:nextfrom
nbe95 wants to merge 1 commit intoarnonym:nextfrom
Conversation
Owner
|
Good find! I'll include that in the next release! Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi there!
Today I found a bug with incomplete menu mappings as it was not possible to jump to a few specific menu IDs.
A brief analysis revealed that all affected IDs were nested entries behind a
timeoutmenu.Root cause: In
create_menu_map, the tree is traversed for each menu and its sub-choices. Bothdefaultandtimeoutare not considered, but they can actually be valid submenus (even with nested menus etc.)Because of that, any menu ID which comes after a timeout/default menu won't make it into the menu map. And thus will not be a valid jump target for any step of the whole menu definition.
Small example (quite useless, only for demonstration):
In this example, the menu map will only contain "main" and "one". "not_one" and "nothing" won't be considered, and so "salad" will be missing, too.
I think all entries should be considered to ensure that jumping from anywhere to any possible (sub)menu is always possible. I applied a fix for that, which is very straightforward.
BR
Niklas