feat(tui): jump to a split pane by its ordinal badge - #1257
Merged
Conversation
M-1..M-9 and C-1..C-9 focus the pane wearing that number; digit 0 focuses the session list. This replaces the old C-1=list / C-2=first-pane mapping so the digit matches the badge. The vim profile also binds C-w 0..9. Clicking a list-row badge focuses that pane.
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
The pane-ordinal badges from #1251 are now an address, not just a locator. One rule everywhere: digit N goes to the pane wearing badge N; digit 0 goes to the session list.
M-1..M-9/M-0— the accelerator that works in every terminal (emacs winum convention; Alt+digit arrives ESC-prefixed even without kitty protocol).C-1..C-9/C-0— the same jump for kitty-protocol terminals.C-w 1..C-w 9/C-w 0— the same numbering behind the existing window-command prefix.Digits 1..9 only fire while badges are on screen (two or more panes), so a lone focused child PTY keeps its own Alt/Ctrl+digit bindings. Digit 0 is the always-available list jump.
Breaking change
C-1used to jump to the session list andC-2to the first pane. Once badges were painted that read as a bug (badge1+C-1focused the other pane). The list jump moved to digit 0.C-x Tabis unchanged.Spec
specs/0199-split-pane-ordinal-badges.mdnow records the addressing rule.specs/0140-terminal-keyboard-disambiguation.mdand the lineage-section spec are updated so they no longer describe the oldC-1= list mapping.Testing
digit_0_keystroke_jumps_focus_to_the_session_list—C-0/M-0jump to the list from any split window.digit_keystroke_focuses_the_pane_wearing_that_badge—C-1/M-2/C-3match badges; out-of-range is a no-op.pane_digits_fall_through_when_there_are_no_badges—C-1no longer steals a single-pane PTY;M-0still jumps to the list.vim_c_w_digit_focuses_the_matching_pane+ keymapC-w 0..9bindings.clicking_a_list_row_badge_focuses_that_pane.This PR only touches
crates/cli→ relevant binary isconstruct.