Conversation
Route committed Winghostty IME results into the terminal input queue and add native dispatch coverage for EDIT composition, dead keys, and non-US layouts. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Colin Neilens <coneilen@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a real Windows terminal input defect found while gathering IME parity evidence.
The defect
Pinned Winghostty consumes
WM_IME_COMPOSITIONand returns 0, so the message never reachesDefWindowProcand noWM_CHARfallback is generated. Committed IME result text therefore has exactly one delivery path:on_ime_update(..., committed=1). ProductionTerminalSurface.onImeUpdatediscarded every argument, so committed CJK text never reached the terminal.The callback also did not match the pinned ABI: it declared the final parameter
cursor: u32wherewin32_host.hdeclaresuint8_t committed. Registration goes through@ptrCast, which erased the mismatch at compile time.The fix
onImeUpdatenow matches the ABI (committed: u8), ignores preedit (committed == 0), and enqueues committed UTF-8 to the owning surface through the existing bounded terminal input queue used by ordinary text.Evidence
A focused test drives the real production callback and proves preedit queues nothing while committed Japanese text reaches the correct surface queue. Native dispatch tests create a real Unicode
EDITcontrol and observe the IME message sequence at its window procedure, then exercise the productionTranslateMessage/DispatchMessageWpath under US-International and French layouts with physical scan codes, observing a real dead-keyWM_DEADCHARfollowed by an accented character. Unavailable layouts are logged and skipped rather than silently weakened.The accelerator table remains 18 entries with all positional assertions unchanged. The test runner is unchanged and still derives 50 distinct roots; no
-limm32addition was required.Ledger row 185 stays
Partial: these are hidden-window Win32 runtime tests, not a foreground UIA walkthrough or live IME candidate-window validation, and terminal preedit rendering remains provider-owned.RED: pinned zig test src\TerminalSurface.zig --test-filter "committed IME composition enters the terminal input queue" -> expected 1, found 0; 0 passed; 0 skipped; 1 failed.
GREEN: pinned zig test src\TerminalSurface.zig --test-filter "committed IME composition enters the terminal input queue" -> All 1 tests passed.
REGRESSION: pinned full MainWindow, TerminalSurface, and App zig test roots -> All 47, 64, and 649 tests passed respectively.