[PR #14521] Duplicated tabs open next to the current tab #30142

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

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

State: closed
Merged: Yes


Summary of the Pull Request

Added an additional optional parameter that indicates the position of the new tab being created.

https://user-images.githubusercontent.com/17508246/206831900-d8349fb6-4241-4c37-8dd8-e1645ba94c90.mp4

https://user-images.githubusercontent.com/17508246/206831949-02e4156e-f471-4d2f-b54b-3b0d294c62fe.mp4

PR Checklist

Detailed Description of the Pull Request / Additional comments

An optional parameter is added to TerminalPage::_CreateNewTabPane() and TerminalPage::_InitializeTab() which indicates the insert position of the duplicated tab.
During a new tab creation (not duplicate), this optional parameter has a default value(-1) and the new tab is inserted at the end.
The duplicated tab is inserted next to the original one even if it is not focused.

Validation Steps Performed

Created different tabs and duplicated them.
Duplicated tabs that are focused and not focused.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/14521 **State:** closed **Merged:** Yes --- <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Added an additional optional parameter that indicates the position of the new tab being created. https://user-images.githubusercontent.com/17508246/206831900-d8349fb6-4241-4c37-8dd8-e1645ba94c90.mp4 https://user-images.githubusercontent.com/17508246/206831949-02e4156e-f471-4d2f-b54b-3b0d294c62fe.mp4 <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #14313 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] Tests added/passed <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments An optional parameter is added to TerminalPage::_CreateNewTabPane() and TerminalPage::_InitializeTab() which indicates the insert position of the duplicated tab. During a new tab creation (not duplicate), this optional parameter has a default value(-1) and the new tab is inserted at the end. The duplicated tab is inserted next to the original one even if it is not focused. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Created different tabs and duplicated them. Duplicated tabs that are focused and not focused.
claunia added the pull-request label 2026-01-31 09:38: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#30142