Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add a wrapper of wcwidth() that picks the best implementation #917
This adds a i_wcwidth() function that replaces mk_wcwidth(), and a
It defaults to auto.
mk_wcwidth() is still preferable in some cases, since the way it uses
The "system" implementation is also wrapped to never return -1, but to
One way in which i saw #720 manifest:
It's invisible outside of mosh, which is interesting, but it's clearly our fault. Using CJK characters that mk_wcwidth knows about, such as
The other CJK character I used in the system wcwidth tests of this PR is
referenced this pull request
Aug 23, 2018
Neat, thanks for the changes.
I'm not really sure why we need utf8proc, but i guess it would make sense to force newer unicode in mac os whose libc is stuck in the past forever. The problem with doing that is that it might make mismatches with the terminal / tmux / mosh / etc more likely. I guess we could just document the risks and benefits.
left a comment
I suppose this conceptually makes sense, given that many terminal emulators seem to find it more important to be "correct" and up to date rather than to match the text-based applications exactly.