fcsonline / tmux-thumbs

A lightning fast version of tmux-fingers written in Rust, copy/pasting tmux like vimium/vimperator
MIT License
915 stars 61 forks source link

Width of wide characters are not calculated correctly? #76

Open m5d215 opened 3 years ago

m5d215 commented 3 years ago

It seems that the character widths of some of the wide characters are not calculated correctly, causing the hints to be misplaced.

echo '├ 192.168.1.1'

prefix+I ⬇️


I expect this is a problem with the unicode-width package, but is it possible to fix it?

fcsonline commented 3 years ago

It is a really long story. I'm also facing this from time to time. It looks like there is a subset of characters that are difficult to know their width. Or on the other hand, unicode-width follows the specification but then the UI representation is a little different.

More information: http://www.unicode.org/reports/tr11/

If we are able to solve this, it will be awesome. I use to play with those two files to get those errors:

https://github.com/fcsonline/tmux-thumbs/blob/master/samples/test4 https://github.com/fcsonline/tmux-thumbs/blob/master/samples/test1