-
Notifications
You must be signed in to change notification settings - Fork 19
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
What do columns in Position
mean?
#1
Comments
You are absolutely right! I am aware that I unfortunately don't support (yet) variable-width characters (e.g. tabs, but also some other unicode characters if I recall correctly), which will break the output (though colors should still be applied correctly). |
As per #1, the term 'columns' has been specified to refer to a unicode codepoint count
I think if you just say that the column numbers are code-point offsets in the line, then you're fine. All you have to worry about then is creating your markers, which I guess require generating whitespace which takes up a given number of code points (easy) and generating a marker element that takes up a given number of code points (also easy?). I actually have no idea how tabs work 😅 |
If everything has been correctly implemented, then all this should already be the case.
As far as I'm aware, they just are single byte characters which are rendered differently depending on many factors (editor configuration, terminal emulators, user environment, etc). Thanks for the issue! 🙂 |
Yeah, the most important thing is just documenting what they're supposed to be so clients can put the right thing in! |
The solution which I want to integrate into my error library Chapelure is to use wcswidth. Sadly there is not yet a standalone binding package for this on Hackage (although there is Graphics.Text.Width from |
Thanks for the link to
I do not want to depend on
This is ideally what I would like to follow, now knowing that functions like those exist. 😀 |
"Columns" of text are not well-defined in the presence of unicode input. I'd suggest specifying that it means unicode code points, and maybe testing with some awkward unicode text.
The text was updated successfully, but these errors were encountered: