Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSC52 parser assumes that len(%p1) is always 2 and breaks otherwise #28

Open
ToxicFrog opened this issue Oct 11, 2024 · 0 comments
Open

Comments

@ToxicFrog
Copy link

The problem line is here in tscreen.go. This assumes that the first parameter of the OSC52 reply will always be exactly one character long, and thus dropping the first two (%p1 and its delimiting ;) will get you the start of the payload. In practice, however, %p1 can be of any length; in tmux it's empty, and in some terminals, including xterm, it can be more than one character long.

This means that when used under these conditions, it either ends up including extra data at the start of the payload, or dropping the first character of the payload; in either case, base64 decoding fails and it can't receive the paste.

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

No branches or pull requests

1 participant