[PR #19778] Delete the KeyChordViewModel if we leave edit mode with no keys #31959

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

Original Pull Request: https://github.com/microsoft/terminal/pull/19778

State: closed
Merged: Yes


Summary of the Pull Request

There was an issue where if the user adds a new keybinding and then hits "cancel changes", the KeyChordViewModel is left in the keybinding list with an empty value. Nothing gets saved to the json, but visually there was an empty keychord box left behind. This commit fixes that.

Validation Steps Performed

Adding a new keybinding and cancelling changes deletes the keybinding.

PR Checklist

  • Closes #xxx
  • Tests added/passed
  • Documentation updated
    • If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema updated (if necessary)
**Original Pull Request:** https://github.com/microsoft/terminal/pull/19778 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request There was an issue where if the user adds a new keybinding and then hits "cancel changes", the KeyChordViewModel is left in the keybinding list with an empty value. Nothing gets saved to the json, but visually there was an empty keychord box left behind. This commit fixes that. ## Validation Steps Performed Adding a new keybinding and cancelling changes deletes the keybinding. ## PR Checklist - [ ] Closes #xxx - [ ] Tests added/passed - [ ] Documentation updated - If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx - [ ] Schema updated (if necessary)
claunia added the pull-request label 2026-01-31 09:50:37 +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#31959