-
Notifications
You must be signed in to change notification settings - Fork 1
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
Use unicode9 character widths #1
Conversation
Current web-specific code implementation is not complete, and assumes non-east-asian. This is still an improvement because at least it compiles. But someone who has access to and is familiar with east-asian systems can complete the functionality.
Restore ability to compile to JavaScript.
Wrap関数を利用した際に、末尾の文字が消えてしまう問題を修正。
Wrap関数を利用した際に、末尾の文字が消えてしまう問題を修正。 (gofmted)
Before this change truncating "asdf" to a length of 4 with tail "…" will result in "asd…". After this change, it will return "asdf".
don't truncate when input already fits
Hi, please send the pull request directly to the upstream (https://github.com/mattn/go-runewidth). The purpose of this fork is only to make fzf unaffected by the changes made in the upstream. (There are of course better ways to manage dependencies in Go project, but anyway that's how I did it.) Once it's merged, just let me know, I'll update the fork. |
This change has been merged upstream. Please update here. |
Done. Thanks! |
Update runewidth to use unicode9 character width tables. This is the default in vim and neovim now, so should be safe to use in any terminal.
The
Condition
is no longer calculated usingIsEastAsian()
as terminals do not use locale to determine how wide to draw ambiguous with characters. Rather, they simply default to 1, and may offer an option to set to 2 (which is discouraged).Once this repo is updated, when fzf is rebuilt, it will then use unicode9 widths as well.
All tests still pass. The API is very close to the way it was, but not identical. Still, fzf compiles using this version without issue.
A good example is to use fzf ctrl-r when there are emoji in the history. This should fix all rendering issues.