-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove command's knowledge of its keys #17215
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pressing "comment" so I can see my comments before making a ruling...
if (_actionMap) | ||
{ | ||
auto actionPaletteItem{ winrt::make<winrt::TerminalApp::implementation::ActionPaletteItem>(action) }; | ||
auto filteredCommand{ winrt::make<FilteredCommand>(actionPaletteItem) }; | ||
_allCommands.Append(filteredCommand); | ||
} | ||
_allCommands.Clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this has a behavior difference - if you call SetCommands(nullptr)
it clears allCommands
. Now if you call SetActionMap(nullptr)
it does not clear allCommands
Is this important?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this was ever being called with nullptr
but I've fixed it to have the same behaviour!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only an open question on the behavior difference
This comment has been minimized.
This comment has been minimized.
The base branch was changed.
With the move to Action IDs, it doesn't quite make sense anymore for a
Command
to know which keys map to it. This PR removes allKeys
fromCommand
, and any callers to that now instead query theActionMap
for that Command's keys.Closes #17160
Closes #13943