Commit 6921c75
committed
fix(ansi): width: always use grapheme finder for width calculation
When we're encountering half-width characters, or joining characters,
it's important that we use the grapheme cluster finder to determine the
width of the string. For example, an ASCII + a joining character is a
single grapheme, but we used to treat it as two separate characters,
which caused the width to be incorrectly calculated as 2 instead of 1.1 parent 266cf5a commit 6921c75
2 files changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
0 commit comments