Skip to content

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

@ToxicFrog

Description

@ToxicFrog

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions