workspace: Fix scrolling to active tab when pinned tabs are present#50538
Merged
MrSubidubi merged 2 commits intozed-industries:mainfrom Mar 3, 2026
Merged
workspace: Fix scrolling to active tab when pinned tabs are present#50538MrSubidubi merged 2 commits intozed-industries:mainfrom
MrSubidubi merged 2 commits intozed-industries:mainfrom
Conversation
Contributor
Author
|
I wasn't sure if any of Bug bashers issues are available, so I found and fixed this one. The original bug I was looking for is the rightmost tab flickering which sometimes shows up on conditions I can't tell exactly. Maybe this PR fixes it, maybe not 🤷♂️. But anyways, it's the bug too. Reproduction: pin one tab and open many unpinned tabs, then navigate from the pinned tab with keyboard, forth and back. With this fix, the navigation will always scrool to the active tab. |
MrSubidubi
approved these changes
Mar 3, 2026
Member
MrSubidubi
left a comment
There was a problem hiding this comment.
Nice find and good fix, very much appreciate you adding a test here. Thank you very much!
tahayvr
pushed a commit
to tahayvr/zed
that referenced
this pull request
Mar 4, 2026
…ed-industries#50538) When pinned tabs are present, activating an unpinned tab passed the absolute tab index to the scroll handle, which only contains unpinned tabs. This caused the scroll-into-view to silently fail. Subtract `pinned_tab_count` from the index so it maps to the correct child in the unpinned tabs scroll container. Release Notes: - Fixed tab bar not reliably scrolling to the active tab when pinned tabs are present.
wzulfikar
pushed a commit
to wzulfikar/zed
that referenced
this pull request
Mar 4, 2026
…ed-industries#50538) When pinned tabs are present, activating an unpinned tab passed the absolute tab index to the scroll handle, which only contains unpinned tabs. This caused the scroll-into-view to silently fail. Subtract `pinned_tab_count` from the index so it maps to the correct child in the unpinned tabs scroll container. Release Notes: - Fixed tab bar not reliably scrolling to the active tab when pinned tabs are present.
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.
When pinned tabs are present, activating an unpinned tab passed the absolute tab index to the scroll handle, which only contains unpinned tabs. This caused the scroll-into-view to silently fail.
Subtract
pinned_tab_countfrom the index so it maps to the correct child in the unpinned tabs scroll container.Release Notes: