Files
Neil ad0dfec9d4 fix(ime): keep plain-committed Hangul so macOS 2-Set can rebuild it in place (#41884)
* fix(ime): keep plain-committed Hangul so macOS 2-Set can rebuild it in place

Right after an input-source switch, macOS 2-Set can commit a lone jamo as
plain text and then rebuild it (ㅇ + ㅏ → 아) by replacing that committed
range. The native text forwarder emptied the field after every commit, so
the replacement had nothing to land on and the vowel was dropped (#9738).

Keep Hangul commits in the field (Latin commits still clear for #11504),
and erase replaced text from the PTY before the replacement is sent.

* fix(ime): only erase retained Hangul when the replacement is forwarded and still at the PTY cursor

Drop retention on blur, on any composition start, and on chord/named keydowns
the pane handles before the forwarder (macOS Ctrl+C, non-Latin control chords).
Erase only for insertText/composition replacements that end at the field tail.

* ci(e2e): route terminal IME changes to IME specs again after the input/ owner move

#39113 moved IME and keyboard policy files under terminal-pane/input/, but the
native IBus and synthetic IME routes still matched the old paths, so IME changes
selected neither lane.
2026-11-13 00:41:53 -08:00
..