Fix Windows IME preedit rendering#10354
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @hacsat88-blip on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR enables Windows winit IME preedit/commit handling through Warp's marked-text pipeline and tracks per-window composing state for keydown routing.
Concerns
⚠️ Windows composing keydown events can still fall through to the existingKeyDownWithTypedCharacterstyped-text fallback when the composingKeyDownis unhandled, so raw key text/control characters can be inserted in addition to the later IME commit.⚠️ This is a user-visible IME rendering/input behavior change with a manual test path, but the PR only lists a test plan and does not include screenshots, a screen recording, or a justification for missing visual evidence.
Verdict
Found: 0 critical, 2 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| key_without_modifiers, | ||
| }, | ||
| is_composing: false, | ||
| is_composing, |
There was a problem hiding this comment.
KeyDownWithTypedCharacters fallback from dispatching TypedCharacters when the composing keydown is unhandled; suppress that fallback for composing events or Windows IME can still insert raw key text in addition to the later commit.
Summary
This PR fixes Windows IME composition rendering by routing winit IME preedit events into Warp's marked text pipeline and routing IME commit events into normal typed character insertion.
Changes
ImeMarkedTextfor Windows release builds, matching the existing marked-text rendering path used by the terminal and editor.SetMarkedTextonly for non-empty winitIme::Preedittext and dispatchClearMarkedTextfor empty preedit, IME disabled, and Windows focus loss.KeyDownevents during composition are markedis_composing, avoiding normal Enter/Escape handling while the IME is still composing.Manual test plan
nihongo.Notes
PR #9730 was used only as design context. This branch is based on upstream
master; upstream does not currently expose amainbranch.Verification
git diff --checkpasses.cargo fmt --checkand Rust compile checks could not be run in this local environment becausecargo/rustcare not installed on PATH.