Files
oh-my-pi/packages
Hanbin Lee 79103dbc4e fix(tui): apply Hangul jamo width correction only on macOS
The Hangul Compatibility Jamo width correction (U+3131..=U+318E → 1 cell)
was applied unconditionally, but macOS terminals (Ghostty, Terminal.app,
iTerm2) are the only ones that render jamo as 1 cell. WezTerm and most
Linux terminals follow UAX#11 and render them as 2 cells.

The unconditional correction caused a width mismatch between the TUI's
calculated column positions and the terminal's actual rendering, resulting
in corrupted layout and broken Korean input on non-macOS platforms.

- Rust: gate the correction with cfg!(target_os = "macos")
- TS: gate the correction with process.platform === "darwin"
- On non-macOS, use UnicodeWidthStr for multi-char graphemes (perf)

Constraint: macOS terminals render jamo as 1 cell despite UAX#11.
Rejected: removing the correction entirely — would break macOS.
Tested: native build succeeds, typecheck passes.
Not-tested: visual verification on macOS terminals.
Scope-risk: narrow
2026-05-27 00:16:59 +09:00
..
2026-05-25 20:30:37 +02:00
2026-05-25 20:30:37 +02:00
2026-05-25 20:30:37 +02:00
2026-05-25 20:30:37 +02:00
2026-05-25 20:30:37 +02:00