mpv
mpv copied to clipboard
msg: consider the width of wide unicode characters
Integrating wcwidth from https://github.com/rmyorston/busybox-w32/blob/master/libbb/wcwidth_alt.c allows clearing the correct number of lines when they wrap because of characters that span 2 cells. It can also be exposed to scripts later.
We considered using the system wcwidth only on Unix, but it only works if you set a locale.
Download the artifacts for this pull request:
Honestly this very much looks like a "not worth it" situation to me.
Honestly this very much looks like a "not worth it" situation to me.
+1
Superseded by #14894.
Superseded by https://github.com/mpv-player/mpv/pull/14894.
To complement on that. The new PR https://github.com/mpv-player/mpv/pull/14894 is filling the gaps that were missing in this one:
- Accessible script to generate the code directly and be able to update it by ourselves, instead using pregenerated one
- Implement tires for unicode codepoints lookup
- Improves classification of more complex grapheme clusters, the new algorithm is following UAX #29
I'm open for other proposals in form of fully featured PR that are better.