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

feat(term): ansi: implement ANSI aware truncation #50

Merged
merged 1 commit into from
Mar 14, 2024

Commits on Mar 13, 2024

  1. feat(term): ansi: implement ANSI aware truncation

    This implements an ANSI and wide-characters aware truncation algorithm
    that uses the newly merged [ANSI parser state machine][statemachine] and
    the fantastic library uniseg.
    
    Since this is using the ANSI state machine, it's compatible with `CSI m`
    (SGR) style sequence, `OSC 8` (hyperlinks), and basically any other
    escape sequence supported in the state machine (DCS, ESC, SOS, PM, APC).
    
    Related: muesli/reflow#71
    
    [statemachine]: https://github.com/charmbracelet/x/blob/main/exp/term/ansi/parser/transition_table.go
    aymanbagabas committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    14e2626 View commit details
    Browse the repository at this point in the history