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

display_width: ignore ANSI hyperlinks in width calculation #526

Merged
merged 2 commits into from
Feb 9, 2024

Conversation

tertsdiepraam
Copy link
Contributor

Closes #525

I've attempted to keep the implementation similar to the current implementation and added a simple test for it. This keeps it in a bit of an awkward state (e.g. comparing with CSI.1 in one branch and ']' in the other). Happy to take suggestions for the direction to take this PR!

@anthraxx
Copy link

I was actually hit by this bug and found this PR. @mgeisler any chance you can take a look 🐱

@tertsdiepraam
Copy link
Contributor Author

I added support for a BEL character as separator between the link and the text. This is used by some programs such as GNU ls and therefore also uutils ls. Since this PR has not seen any activity, I'll be moving uutils to my own crate, but I figured I would still fix the same issue here. I think it would still be nice for the community to have this PR merged!

Copy link
Owner

@mgeisler mgeisler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this!

@mgeisler
Copy link
Owner

mgeisler commented Feb 9, 2024

Thanks for the ping! I'm sorry I had forgotten about this... let's merge it right away so I can make a new release.

@mgeisler mgeisler merged commit e7a20ef into mgeisler:master Feb 9, 2024
25 checks passed
@tertsdiepraam
Copy link
Contributor Author

Thanks!

@github-actions github-actions bot mentioned this pull request Feb 11, 2024
@mgeisler
Copy link
Owner

I finally got around to merge the release PR: #533 and this means 0.16.1 is available!

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.

display_width and hyperlinks
3 participants