feat(navigation): show tab index in titles (display-tab-number)#1697
Open
cmoron wants to merge 1 commit into
Open
feat(navigation): show tab index in titles (display-tab-number)#1697cmoron wants to merge 1 commit into
cmoron wants to merge 1 commit into
Conversation
This was referenced Jun 30, 2026
cmoron
force-pushed
the
feat/display-tab-number
branch
from
June 30, 2026 22:57
3a4d0f1 to
7f89076
Compare
In `Tab` navigation mode the strip shows only each tab's title, which makes visual/keyboard tab tracking harder on wide layouts (raphamorim#1537). The maintainer endorsed a `[navigation] display-tab-number` toggle in PR raphamorim#593, closed only because the tab system was being rewritten for v0.3; that rewrite has since landed. Opt-in (default false). The number is the 1-based render position, so reordering tabs (keyboard move or drag) renumbers them for free. The index/title separator is configurable via `tab-number-separator` (default a single space).
cmoron
force-pushed
the
feat/display-tab-number
branch
from
July 19, 2026 14:19
7f89076 to
5be6540
Compare
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
Adds an opt-in
[navigation] display-tab-numbersetting. When enabled, each tab in the rio-rendered strip is prefixed with its 1-based visual position:Default is
false— no change for existing users.Closes #1537.
Why
[navigation] display-tab-number = true". That PR was closed only because "this will change a lot on v0.3 as the tab system is being rewritten" — the rewrite has since landed, so this reimplements it on the currentIslandstrip.Behavior
tab_index), i.e. the live slot inContextManager'scontextsvector. Keyboard moves (move_current_to_*) and drag-reorder physically reorder that vector, so a tab dragged from slot 3 to the front becomes1and the rest shift up (ghostty-style), live during the drag.tab-number-separatoris the string inserted between the number and the title. Default is a single space (1 vim); set" - "for1 - vim,": "for1: vim, or""for1vim.Tabmode only.Plainhas no strip;NativeTab(macOS) uses the OS tab bar, which rio doesn't render.Implementation
rio-backend: twoNavigationfields —display-tab-number: boolandtab-number-separator: String(default" ").frontends/rioterm:Islandcarries both;get_title_for_tabapplies the prefix via a small pureformat_tab_label(display, position, separator, title)helper, so both the strip and the drag preview share one code path.Tests
rio-backend: parsesdisplay-tab-number/tab-number-separatorand checks defaults.rioterm:format_tab_labelprefix + separator logic, and a reorder test asserting the moved tab renumbers (["a","b","c"]→ movecto front →["1 - c","2 - a","3 - b"]).cargo fmt --check,cargo clippy --all-targets --features wgpu, and the touched test suites pass locally.Docs
Companion docs PR (config reference for both options): raphamorim/rioterm.com#2