Skip to content

Jump to a session by any number, not only 1 to 9 - #20

Merged
tdwd merged 1 commit into
mainfrom
jump-digits
Oct 7, 2026
Merged

tdwd merged 1 commit into
mainfrom
jump-digits

Conversation

@tdwd

@tdwd tdwd commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

^g and a number now jumps to any session, not only 1 to 9.

  • A number completes as soon as no session number could start with it, or on ↵. Nothing is timed.
  • With 15 sessions, ^g 7 jumps at once; ^g 1 waits, then 4 goes to 14 and ↵ goes to 1. With nine or fewer, nothing changes.
  • While a number waits, the footer says so. Esc drops it, a fresh ^g starts again, and any other key runs as its own command.
  • Digits batched into one message count as one number. Before, such a batch was ignored.
  • The armed sidebar numbers every card, padded so the titles line up.

Checked by hand in a real tmux with 12 sessions: ^g 7, ^g 1 1 and ^g 1 ↵ each landed on the card showing that number.

^g and a number jumps to that session at any count. A number is
complete as soon as no session number could start with it, or on ↵, so
nothing is timed. With 15 sessions ^g 7 jumps at once, because there
is no 70, while ^g 1 waits: a 4 goes to 14 and ↵ goes to 1. With nine
or fewer, 1 to 9 jump at once as before.

While a number waits, the footer says what completes it. Esc drops it.
A fresh ^g drops it and arms again, so ^g 1 ^g 3 is 3; taken as a
command, that second ^g was the literal prefix and sent every key
after it to the agent. Any other key drops the number and runs as the
command it is. A mouse press drops it with the prefix.

Digits that arrive in one message are one number. Bubble Tea batches
the runes of a read, so a fast "14" can arrive whole, and the old rule
ignored such a batch. A pasted run past any session count is capped,
so it cannot wrap around into a real session number, even where int is
32 bits.

The armed sidebar numbers every card, padded so the titles line up.
The jump code moves to jump.go, with digitKey and its comment.
@tdwd
tdwd merged commit 5f1e0a8 into main Oct 7, 2026
3 checks passed
@tdwd
tdwd deleted the jump-digits branch October 7, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant