Always open duplicated tabs next to source tab - #20565
Open
OmarMashal (OmarMashal0) wants to merge 2 commits into
Open
Always open duplicated tabs next to source tab#20565OmarMashal (OmarMashal0) wants to merge 2 commits into
OmarMashal (OmarMashal0) wants to merge 2 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Author
|
@microsoft-github-policy-service agree |
Ráduly, Csaba (Bu11etmagnet)
approved these changes
Aug 24, 2026
Ráduly, Csaba (Bu11etmagnet)
left a comment
There was a problem hiding this comment.
This change removes user choice, but it gives me what I wanted, so I take it :)
| // In the future, it may be preferable to just duplicate the | ||
| // current control's live settings (which will include changes | ||
| // made through VT). | ||
| uint32_t insertPosition = _tabs.Size(); |
There was a problem hiding this comment.
At least this change gets rid of this initialize-then-modify antipattern.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes duplicate tab placement so duplicated tabs always open immediately after the source tab, regardless of the configured
newTabPosition.Previously, when
newTabPositionwas set toAfterLastTab, duplicated tabs were inserted at the end of the tab list. This change keeps normal new-tab behavior unchanged while making duplicate-tab placement consistently use the source tab's position.Fixes #20355
Validation
TabTests::TryDuplicateBadTabTabTests::NextMRUTabTabTests::TestClampSwitchToTabTabTests::DuplicateTabAlwaysOpensAfterCurrentnewTabPositionset toAfterLastTabScreenshots
Before
Duplicating
tab2placed the duplicated tab at the end of the tab list.After
Duplicating
tab2now places the duplicated tab immediately after the source tab.