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

Enhance parser to understand more than just CSI sequences #65

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

srlehn
Copy link

@srlehn srlehn commented Nov 13, 2023

Currently PrintableRuneWidth() only looks out for CSI sequences in the ANSI standard. This PR adds support for common ST-terminated (ST = STRING TERMINATOR | "ESC " or "\a") sequences. Examples are OSC-sequences used by the sixel,iTerm2, DomTerm graphics format, APC-sequences (used for kitty graphics). This code is taken from my termimg library and modified slightly.

Fixes #64

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.

OSC sequences are mis-counted in PrintableRuneWidth
1 participant