[PR #11040] Only attempt to focus if there is a control to focus #28370

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

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

State: closed
Merged: Yes


Only focus if there is a control to focus (which may be null if e.g. the focused tab is being destroyed)

Closes #11037

Additional comments

I tried to remove the _activePane = nullptr in TerminalTab::DetachPane but that actually completely broke being able to focus the control at all making the tab completely unusable. Focus does seem to transfer just fine here with this change.

Validation Steps Performed

Used the command execution to move panes to and from existing panes, including new tabs and destroying tabs.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/11040 **State:** closed **Merged:** Yes --- Only focus if there is a control to focus (which may be null if e.g. the focused tab is being destroyed) Closes #11037 ## Additional comments I tried to remove the _activePane = nullptr in `TerminalTab::DetachPane` but that actually completely broke being able to focus the control at all making the tab completely unusable. Focus does seem to transfer just fine here with this change. ## Validation Steps Performed Used the command execution to move panes to and from existing panes, including new tabs and destroying tabs.
claunia added the pull-request label 2026-01-31 09:28:05 +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#28370