tigrawap / slit

slit - a modern PAGER for viewing logs, get more than most in less time
Other
469 stars 18 forks source link

Support multi-byte characters #88

Closed y-yagi closed 3 years ago

y-yagi commented 3 years ago

In the case of that input string contains multi-byte characters, not always length is one. So current implementation doesn't show multi-byte characters correctly.

This patch fixes to use runewidth.RuneWidth to get correct length.

tigrawap commented 3 years ago

Interesting, did not consider this Merging as-is, however, I guess this can cause weird behaviour when rendering 2-cells rune in the last column