Closed jesseduffield closed 3 years ago
Box Drawing characters (u2500 to u257f) has a Ambiguous East Asian Width. It is Unicode specification. I think the implementation of the go-runewidth is correct.
The solution to the problem is to configure the terminal application correctly AND use the correct font.
Alternatively, add an option to draw lines with only ASCII characters.
Could you please try
export RUNEWIDTH_EASTASIAN=0
Or
runewidth.DefaultCondition.EastAsian = false
@mattn thanks I'll give runewidth.DefaultCondition.EastAsianWidth = false
a go. Feel free to close
When using an east asian encoding, the following runes are given a width of 2 but they should be 1:
─┌└┐┘│
.To reproduce:
looking at the runewidth_table.go file, the culprit is
{0x24EB, 0x254B}
in theambiguous
table. I'm not sure how to update this; the file is auto-generated.In terminal apps which render box characters this can lead to broken rendering:
Let me know if there's anything else I can add. Thanks :)