Files
orca/config/patches
Neil 58d0de6bb6 fix(terminal): keep the text of an IME key pressed before a commit finalizes (#28441)
* fix(terminal): keep the text of an IME key pressed before a commit finalizes

A Process (229) keydown that lands after compositionend but before xterm's deferred
finalizer runs took the composing early return and never recorded that it owed its
own commit. When the finalizer ran first, the key's insertText found no pending
transaction and no owed commit, so xterm dropped it: `你` then `,` reached the PTY
as `你`.

Record the debt for such a keydown when the ended session's commit is already in the
textarea, and clear it when the pending transaction settles the text itself. Sessions
still waiting for their post-composition echo keep their old path, so the echo cannot
be sent twice.

Fixes the intermittent terminal-linux-direct-ime-commit e2e failure.

* fix(terminal): keep a commit when Escape or a keypress follows compositionend

A plain Escape after compositionend cancelled the accepted commit, dropping both the
text and the Escape; it now settles the commit and then sends Escape. The Escape that
itself ends a session (still composing, reported after compositionend) still cancels.

A keypress for the Process key that owes a commit now clears that debt, so a later
input cannot send the key's text a second time.
2026-10-13 22:13:25 -07:00
..