[PR #17794] A trio of snippets pane fixes #31375

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

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

State: closed
Merged: Yes


  1. Don't crash on a cmdpal "duplicate pane" of a snippets pane
    • Found while trying to solve bug the third.
    • "Duplicate pane" with a snippets pane would crash. This was due to us attempting to PreviewText when there was no buffer yet. (_activeBuffer() strikes again)
  2. dismiss the preview from cmdpal correctly too
    • Again while looking for part the third, I hit this
    • I have a sendInput(input: "a") command. This is the first command in the palette. And opening a new pane would... preview that command in the new pane? weird. Moving the line in CommandPalette::_close fixes this
  3. Don't crash when we're restoring a snippets pane and there's a bunch of windows
**Original Pull Request:** https://github.com/microsoft/terminal/pull/17794 **State:** closed **Merged:** Yes --- 1. Don't crash on a cmdpal "duplicate pane" of a snippets pane * Found while trying to solve bug the third. * "Duplicate pane" with a snippets pane would crash. This was due to us attempting to `PreviewText` when there was no buffer yet. (`_activeBuffer()` strikes again) 2. dismiss the preview from cmdpal correctly too * Again while looking for part the third, I hit this * I have a `sendInput(input: "a")` command. This is the first command in the palette. And opening a new pane would... preview that command in the new pane? weird. Moving the line in `CommandPalette::_close` fixes this 3. Don't crash when we're restoring a snippets pane and there's a bunch of windows * This was the real bug I was trying to fix * Looks like if you have enough panes & windows, there's enough of a delay between ctoring a snippets pane and actually calling `_UpdateSettings` on it, that the XAML loads and tries to bind to `_allTasks`, which _hadn't been constructed yet_ * closes #17793
claunia added the pull-request label 2026-01-31 09:46:51 +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#31375