mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-17 16:38:54 +00:00
* Fix column alignment for wide and combining Unicode chars (#1520, #379) PPRINT, markdown-aligned, and XTAB writers measured column widths with utf8.RuneCountInString, which counts codepoints rather than terminal display columns. East-Asian fullwidth characters (counted as 1 but displayed as 2) and zero-width combining marks (counted as 1 but displayed as 0) both caused misalignment. Add lib.DisplayWidth wrapping uniseg.StringWidth, and use it from the three writers. The XTAB right-aligned path also drops fmt.Sprintf with %*s since Go's %*s pads by rune count too. UTF8Strlen is unchanged so DSL strlen semantics are preserved. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Fix PPRINT alignment with multi-character OFS (#1819) Previously, writePadding repeated the OFS string for each padding slot, so non-space or multi-character OFS values produced misaligned columns and leaked the separator into padding (e.g. --ofs=XY yielded aXYXYXYXYb). Pad with spaces instead, leaving OFS to act only as the column separator. The default single-space OFS is unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Use non-space multi-char OFS in test 0021 for Windows portability PowerShell collapses single-quoted ' ' in command lines, which broke the test on the windows-latest CI runner. Switch to --ofs XY, which exercises the same multi-character padding code path without shell quoting hazards. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| 0001 | ||
| 0002 | ||
| 0003 | ||
| 0004 | ||
| 0005 | ||
| 0006 | ||
| 0007 | ||
| 0008 | ||
| 0009 | ||
| 0010 | ||
| 0011 | ||
| 0012 | ||
| 0013 | ||
| 0014 | ||
| 0015 | ||
| 0016 | ||
| 0017 | ||
| 0018 | ||
| 0019 | ||
| 0020 | ||
| 0021 | ||