Files
YAMAGUCHI, Rei 3b8c5606ee Add configurable ambiguous-width policy (narrow/wide) (#19864)
This PR introduces `compatibility.ambiguousWidth` as a **global**
compatibility setting (`narrow` default, `wide` optional).

The default remains `narrow`.

Why global-only in this PR:
- Width detection is currently process-wide (`CodepointWidthDetector`
  singleton).
- True profile-level ambiguous-width behavior would require broader
  architectural changes and is intentionally deferred to a follow-up
  design/PR.

What this PR guarantees:
- Terminal-side handling is consistent end-to-end for the selected
  ambiguous-width policy (rendering path + ConPTY/host propagation).

Known limitation:
- Some client applications (for example PSReadLine/readline-based apps)
  may still compute character widths independently.
- In such cases, cursor movement or Backspace behavior can differ from
  visual cell width even when terminal-side policy is consistent.

This is a compatibility/readability trade-off feature:
- `narrow`: prioritize cross-application compatibility.
- `wide`: prioritize readability with many CJK fonts.

Closes #153
Closes #370
Refs #2928
Refs #2049, #2066, #2375, #900, #5910, #5914

Co-authored-by: Leonard Hecker <lhecker@microsoft.com>
2026-02-27 19:54:56 +00:00
..