Fix kitty protocol within tmux, and improve its handling #39
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.
I can split this up if needed, but there's a few overlapping changes that lead to conflicts so I thought it was easier to put into one PR.
The first commit (probabilistically) avoids issues with having multiple applications rendering images, previously they were almost guaranteed to use overlapping ids since they all started from 1 and only had 255 ids available. Now the full
u32
support from the protocol is used with a random starting point so it's unlikely to overlap.The second commit fixes #22, the kitty-protocol escape sequences are now wrapped in tmux-passthrough escapes if needed.
The third and fourth fix issues I noticed while debugging issues and reading the spec.
The fifth and sixth are minor performance improvements.