chapelure
chapelure copied to clipboard
What is a column?
Ideally we want a binding to a good implementation C function wcswidth
to determine how many columns characters takes up, because as far as I can tell, this is the closest to the standard, at least for counting columns on monospace terminals.
vty
has an implementation but we probably don't want to depend on the whole thing, so either asking for that to be split out or making our own standalone library for it would be good
- [ ] Make a
wcswidth
package - [ ] Add helper functionality to Chapelure to turn column numbers in terms of unicode codepoints (what you get from
length
applied to a String, basically) to proper column counts - [ ] Render in terms of proper column numbers. Care needs to be taken to match up the highlights, etc, properly
There already seems to be https://github.com/solidsnack/wcwidth but it seems to have a few issues