[PR #11427] [MERGED] Fix crash and empty action in SUI Actions Page #28566

Open
opened 2026-01-31 09:29:20 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/11427
Author: @carlos-zamora
Created: 10/6/2021
Status: Merged
Merged: 10/6/2021
Merged by: @undefined

Base: mainHead: dev/cazamor/sui/bugfix-actions


📝 Commits (1)

  • 9ed1dfd Fix crash and empty action in SUI Actions Page

📊 Changes

2 files changed (+8 additions, -9 deletions)

View changed files

📝 src/cascadia/TerminalSettingsEditor/Actions.cpp (+2 -2)
📝 src/cascadia/TerminalSettingsModel/ActionMap.cpp (+6 -7)

📄 Description

Summary of the Pull Request

Fixes two issues related to SUI's Actions page:

  1. Crash when adding an action and setting key chord to one that is already taken
    • Cause: the new key binding that was introduced with the "Add new" button appears in _KeyBindingList that we're iterating over. This has no CurrentKeys(), resulting in a null pointer exception.
    • Fix: null-check it
  2. There's an action that appears as being nameless in the dropdown
    • Cause: The culprit seems to be MultipleActions. We would register it, but it wouldn't have a name, so it would appear as a nameless option.
    • Fix: if it has no name, don't register it. This is also future-proof in that any new nameless actions won't be automatically added.

Closes #10981
Part of #11353


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/11427 **Author:** [@carlos-zamora](https://github.com/carlos-zamora) **Created:** 10/6/2021 **Status:** ✅ Merged **Merged:** 10/6/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/cazamor/sui/bugfix-actions` --- ### 📝 Commits (1) - [`9ed1dfd`](https://github.com/microsoft/terminal/commit/9ed1dfd7ef527c679663500a790e3f2ec6d777fc) Fix crash and empty action in SUI Actions Page ### 📊 Changes **2 files changed** (+8 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalSettingsEditor/Actions.cpp` (+2 -2) 📝 `src/cascadia/TerminalSettingsModel/ActionMap.cpp` (+6 -7) </details> ### 📄 Description ## Summary of the Pull Request Fixes two issues related to SUI's Actions page: 1. Crash when adding an action and setting key chord to one that is already taken - **Cause**: the new key binding that was introduced with the "Add new" button appears in `_KeyBindingList` that we're iterating over. This has no `CurrentKeys()`, resulting in a null pointer exception. - **Fix**: null-check it 2. There's an action that appears as being nameless in the dropdown - **Cause**: The culprit seems to be `MultipleActions`. We would register it, but it wouldn't have a name, so it would appear as a nameless option. - **Fix**: if it has no name, don't register it. This is also future-proof in that any new nameless actions won't be automatically added. Closes #10981 Part of #11353 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:29:20 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#28566