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(cellbuf): implement style aware text wrapping #350

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aymanbagabas
Copy link
Member

@aymanbagabas aymanbagabas commented Jan 28, 2025

This uses the same algorithm as in ansi.Wrap except that it also keeps
track of the cursor style and link state and applies them to the wrapped
text.

We should use this instead of ansi.Wrap wherever styles and Hyperlinks
are important.

@aymanbagabas aymanbagabas requested a review from caarlos0 January 28, 2025 23:03
@aymanbagabas aymanbagabas force-pushed the cellbuf/wrap branch 2 times, most recently from 7fab72c to 6ca6ac5 Compare February 12, 2025 17:45
@aymanbagabas aymanbagabas marked this pull request as draft February 13, 2025 15:01
@aymanbagabas aymanbagabas marked this pull request as ready for review February 13, 2025 21:38
@raphamorim
Copy link
Member

Great you add good test cases!

This uses the same algorithm as in `ansi.Wrap` except that it also keeps
track of the cursor style and link state and applies them to the wrapped
text.

We should use this instead of `ansi.Wrap` wherever styles and Hyperlinks
are important.
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.

2 participants