Repository navigation
Jump to a session by any number, not only 1 to 9 - #20
Merged
Merged
Conversation
^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.
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.
^gand a number now jumps to any session, not only 1 to 9.↵. Nothing is timed.^g 7jumps at once;^g 1waits, then4goes to 14 and↵goes to 1. With nine or fewer, nothing changes.^gstarts again, and any other key runs as its own command.Checked by hand in a real tmux with 12 sessions:
^g 7,^g 1 1and^g 1 ↵each landed on the card showing that number.