-
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
Fix crash and empty action in SUI Actions Page #11427
Conversation
@@ -369,7 +369,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation | |||
{ | |||
const auto kbdVM{ get_self<KeyBindingViewModel>(_KeyBindingList.GetAt(i)) }; | |||
const auto& otherKeys{ kbdVM->CurrentKeys() }; |
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.
The &
isn't necessarily needed here.
if (actionAndArgs->Action() != ShortcutAction::Invalid) | ||
/*We have a valid action.*/ | ||
/*Check if the action was already added.*/ | ||
if (visited.find(Hash(*actionAndArgs)) == visited.end()) |
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.
You can use the count()
method instead of find()
if you'd like.
The C-style comments could also be replaced with modern ones.
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 might have blocked over the two of these nits combined -- the comments don't follow our style at all (even spacing-wise), for example..?
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 didn't add the comments though...
Hello @zadjii-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
🎉 Handy links: |
Summary of the Pull Request
Fixes two issues related to SUI's Actions page:
_KeyBindingList
that we're iterating over. This has noCurrentKeys()
, resulting in a null pointer exception.MultipleActions
. We would register it, but it wouldn't have a name, so it would appear as a nameless option.Closes #10981
Part of #11353