Repository navigation
Commit 26f3a6f
committed
fix(terminal): use standard unicode display widths
Use unicode-width standard width calculation for terminal table output so ambiguous-width characters are measured like non-CJK terminal columns while CJK and combining marks still render with their expected widths.
Simplify the compact-date minimum width condition to keep the behavior explicit: preserve a 12-column date only when compact dates are enabled and the table already fits, otherwise allow the 10-column compact form. Add direct width cases for ASCII, CJK, combining marks, controls, and ambiguous characters.1 parent c66eb41 commit 26f3a6f
2 files changed
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
143 | | - | |
144 | | - | |
| 142 | + | |
145 | 143 | | |
146 | 144 | | |
147 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
53 | 62 | | |
0 commit comments