Improved corrections tables#226
Conversation
Such as standaline fitzpatricks, 🏼🏽🏾🏿 etc are width 0, 'narrower' only covered "usually wide characters are narrow", we need additional 'zeroer' case for terminals like this.
Merging this PR will degrade performance by 18.55%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | test_wcstwidth_term_program[xterm.js] |
875.1 µs | 1,262.3 µs | -30.68% |
| ❌ | test_width_term_program[xterm.js] |
933.6 µs | 1,319.7 µs | -29.25% |
| ❌ | test_wcstwidth_wide_term_program[ghostty] |
561.1 µs | 748.9 µs | -25.07% |
| ❌ | test_wcstwidth_vs16_term_program[xterm.js] |
761.5 µs | 949.7 µs | -19.82% |
| ❌ | test_width_vs16_term_program[xterm.js] |
812.7 µs | 998.7 µs | -18.63% |
| ❌ | test_wcstwidth_term_program[ghostty] |
729 µs | 842.1 µs | -13.43% |
| ❌ | test_width_term_program[ghostty] |
784.3 µs | 895.4 µs | -12.42% |
| ❌ | test_wcstwidth_vs15_term_program[ghostty] |
679.7 µs | 768.8 µs | -11.59% |
| ❌ | test_width_vs15_term_program[ghostty] |
736.2 µs | 824.5 µs | -10.71% |
| ❌ | test_width_udhr |
556.8 ms | 621.8 ms | -10.46% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing jq/bugfix-more-than-narrow (187c481) with master (e8405a6)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #226 +/- ##
===========================================
- Coverage 100.00% 99.89% -0.11%
===========================================
Files 27 27
Lines 1924 1938 +14
Branches 456 458 +2
===========================================
+ Hits 1924 1936 +12
- Misses 0 1 +1
- Partials 0 1 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Improved**
wcstwidth()_ with newzeroer,narrow_wider, andnarrow_zeroerCorrections_.Such as standalone fitzpatricks, 🏼🏽🏾🏿 etc are width 0, 'narrower' only covered "usually wide characters are narrow", we need additional 'zeroer' case for terminals like this.
PUA codes ignored
surrogate pairs ignored