[PR #5883] [MERGED] Manually close tabs when they're closed while dragging them #26525

Closed
opened 2026-01-31 09:16:35 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/5883
Author: @zadjii-msft
Created: 5/13/2020
Status: Merged
Merged: 5/14/2020
Merged by: @undefined

Base: masterHead: dev/migrie/b/5559-why-would-you-ever-do-this


📝 Commits (1)

  • 7cde53a Manually close tabs when they're closed while dragging them

📊 Changes

1 file changed (+14 additions, -1 deletions)

View changed files

📝 src/cascadia/TerminalApp/TerminalPage.cpp (+14 -1)

📄 Description

Summary of the Pull Request

When we're dragging the tab around, if you execute a ClosePane/CloseTab, then we should make sure to actually activate a new tab, so that focus doesn't just fall into the void.

References

  • This is almost exactly #5799, but with rearranging tabs

PR Checklist

Detailed Description of the Pull Request / Additional comments

We suppress _OnTabItemsChanged events during a rearrange, so if a tab is closed while we're rearranging tabs, the we don't fire the SelectionChanged event that we usually do during a close that would select the new tab.

Validation Steps Performed

  • Tested manually
    • Confirmed that tragging a tab out, closing it, then dragging it back in does nothing.

🔄 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/5883 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 5/13/2020 **Status:** ✅ Merged **Merged:** 5/14/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/migrie/b/5559-why-would-you-ever-do-this` --- ### 📝 Commits (1) - [`7cde53a`](https://github.com/microsoft/terminal/commit/7cde53a373a580af2230e2e265829c88f70dae75) Manually close tabs when they're closed while dragging them ### 📊 Changes **1 file changed** (+14 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+14 -1) </details> ### 📄 Description ## Summary of the Pull Request When we're dragging the tab around, if you execute a `ClosePane`/`CloseTab`, then we should make sure to actually activate a new tab, so that focus doesn't just fall into the void. ## References * This is almost exactly #5799, but with rearranging tabs ## PR Checklist * [x] Closes #5559 * [x] I work here * [ ] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments We suppress `_OnTabItemsChanged` events during a rearrange, so if a tab is closed while we're rearranging tabs, the we don't fire the `SelectionChanged` event that we usually do during a close that would select the new tab. ## Validation Steps Performed * Tested manually - Confirmed that tragging a tab out, closing it, then dragging it back in does nothing. --- <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:16:35 +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#26525