[PR #15178] [MERGED] Fix reordering tabs mysteriously shuffling the actual backing tabs #30470

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/15178
Author: @zadjii-msft
Created: 4/13/2023
Status: Merged
Merged: 4/17/2023
Merged by: @microsoft-github-policy-service[bot]

Base: mainHead: dev/migrie/b/15121-over-and-under-hill


📝 Commits (5)

  • 7e4f37a this has lots of dead code, but it fixes it
  • 293967d last cleanup
  • 9313383 this snuck in
  • bf0f7d7 Merge remote-tracking branch 'origin/main' into dev/migrie/b/15121-over-and-under-hill
  • f8f8a10 I guess that's not a word, you're right

📊 Changes

3 files changed (+29 additions, -36 deletions)

View changed files

📝 src/cascadia/TerminalApp/TabManagement.cpp (+23 -30)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+4 -3)
📝 src/cascadia/TerminalApp/TerminalPage.h (+2 -3)

📄 Description

TL;DR: we stopped getting TabView.TabItemsChanged. This meant that the tab view would change its apparent order, but we wouldn't change the backing tab order.

I'm fixing this by grabbing the index of the tab that starts the drag, and the index of the tab view item at the end of the drag, and using that to reorder our backing list.

Closes #15121

Upstream https://github.com/microsoft/microsoft-ui-xaml/issues/8388

Regressed in #15078 - I'm pretty confident about this, since I've got a 1.18.931 build of the Terminal with tear-out, but not MUX 2.8.


🔄 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/15178 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 4/13/2023 **Status:** ✅ Merged **Merged:** 4/17/2023 **Merged by:** [@microsoft-github-policy-service[bot]](https://github.com/apps/microsoft-github-policy-service) **Base:** `main` ← **Head:** `dev/migrie/b/15121-over-and-under-hill` --- ### 📝 Commits (5) - [`7e4f37a`](https://github.com/microsoft/terminal/commit/7e4f37a5f35de8235a1ebb71ac4bcecad752a75c) this has lots of dead code, but it fixes it - [`293967d`](https://github.com/microsoft/terminal/commit/293967da958bb0188002f7433edb987b91dc8e5d) last cleanup - [`9313383`](https://github.com/microsoft/terminal/commit/931338321bc861e801d91f41794605c150075b15) this snuck in - [`bf0f7d7`](https://github.com/microsoft/terminal/commit/bf0f7d7379fef1c55e57b84dde7d1ef6c9992c4d) Merge remote-tracking branch 'origin/main' into dev/migrie/b/15121-over-and-under-hill - [`f8f8a10`](https://github.com/microsoft/terminal/commit/f8f8a1084dc5580acb731e20fe132b466bdfa34d) I guess that's not a word, you're right ### 📊 Changes **3 files changed** (+29 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/TabManagement.cpp` (+23 -30) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+4 -3) 📝 `src/cascadia/TerminalApp/TerminalPage.h` (+2 -3) </details> ### 📄 Description TL;DR: we stopped getting `TabView.TabItemsChanged`. This meant that the tab view would change its apparent order, but we wouldn't change the backing tab order. I'm fixing this by grabbing the index of the tab that starts the drag, and the index of the tab view item at the end of the drag, and using that to reorder our backing list. Closes #15121 Upstream https://github.com/microsoft/microsoft-ui-xaml/issues/8388 Regressed in #15078 - I'm pretty confident about this, since I've got a 1.18.931 build of the Terminal with tear-out, but not MUX 2.8. --- <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:41:00 +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#30470