Commit 59b5561
committed
fix(bench): correct header box alignment with unicode-aware width calculation
Fixed the alignment offset in print_header() function:
- Changed padding calculation from (110 - text.len()) to (107 - text_width)
- Added unicode_width dependency for proper emoji display width handling
- Now correctly handles headers with emojis like "📊 SUMMARY"
The box structure is:
- Total width: 110 chars
- Border + space: ║ (2 chars)
- Text content: text_width chars
- Padding: (107 - text_width) chars
- Final border: ║ (1 char)1 parent 53ef5f0 commit 59b5561
3 files changed
+5
-1
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
392 | 393 | | |
393 | 394 | | |
394 | 395 | | |
| 396 | + | |
395 | 397 | | |
396 | 398 | | |
397 | 399 | | |
| |||
400 | 402 | | |
401 | 403 | | |
402 | 404 | | |
403 | | - | |
| 405 | + | |
404 | 406 | | |
405 | 407 | | |
406 | 408 | | |
| |||
0 commit comments