Fix Tab navigation in split editors (revert CTabFolder workaround, requires SWT fix)#4190
Open
fedejeanne wants to merge 1 commit into
Open
Conversation
Restores the standard focus-traversal behavior in TraversePageHandler by removing the special-casing that was added for CTabFolder (loop-to-first/ last-item logic, hidden-item detection, and the top-level CTabFolder lookup helpers introduced by eclipse-platform#2864 and the earlier fix for eclipse-platform#4135). This special-casing was a workaround for CTabFolder not looping over its own tabs when using Ctrl+PageUp/PageDown. That is now fixed directly in SWT's CTabFolder.onPageTraversal (see eclipse-platform/eclipse.platform.swt#3448), which makes this handler's workaround unnecessary and, in some cases, incorrect (e.g. it bypassed the chevron/drop-down list when tabs did not fit). Requires eclipse-platform/eclipse.platform.swt#3448 to be merged/available for the circular navigation behavior to still work correctly. Fixes eclipse-platform#4135 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fedejeanne
force-pushed
the
fix_tab_navigation_split_editors
branch
from
July 17, 2026 08:01
0b10768 to
5f1f875
Compare
Contributor
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.
What
Fixes #4135.
This PR reverts
TraversePageHandlerback to its standard, original traversal behavior, removing theCTabFolder-specific special-casing that had been added as a workaround (loop-to-first/last-item logic, hidden-item detection, and the top-levelCTabFolderparent-hierarchy lookup helper introduced by #2864 and the earlier attempt at fixing #4135).That special-casing was only needed because
CTabFolderitself did not loop over its own tabs when navigating with Ctrl+PageUp/PageDown, and it caused regressions such as bypassing the chevron drop-down list when tabs did not fit on screen (which is presumably the root cause of #4135, since the workaround interfered with focus traversal in split editors).Dependency
This PR requires eclipse-platform/eclipse.platform.swt#3448 to be merged/available. That SWT PR fixes
CTabFolder.onPageTraversaldirectly, soCTabFoldernow correctly wraps around from the last tab to the first (and vice versa) on its own — without needing any workaround at theTraversePageHandlerlevel, and without breaking the chevron behavior when not all tabs fit.How to test
CTabFolders correctly.