Skip to content

Fix Windows IME preedit rendering#10354

Closed
hacsat88-blip wants to merge 1 commit into
warpdotdev:masterfrom
hacsat88-blip:fix/windows-ime-preedit
Closed

Fix Windows IME preedit rendering#10354
hacsat88-blip wants to merge 1 commit into
warpdotdev:masterfrom
hacsat88-blip:fix/windows-ime-preedit

Conversation

@hacsat88-blip
Copy link
Copy Markdown

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

  • Enable ImeMarkedText for Windows release builds, matching the existing marked-text rendering path used by the terminal and editor.
  • Dispatch SetMarkedText only for non-empty winit Ime::Preedit text and dispatch ClearMarkedText for empty preedit, IME disabled, and Windows focus loss.
  • Track Windows winit preedit state per window so KeyDown events during composition are marked is_composing, avoiding normal Enter/Escape handling while the IME is still composing.
  • Preserve the existing macOS Objective-C IME path.

Manual test plan

  1. Launch Warp on Windows.
  2. Enable Microsoft IME Japanese.
  3. Type nihongo.
  4. Confirm composing text appears in the input field before pressing Enter.
  5. Press Space to convert.
  6. Confirm converted candidates update the visible composition text.
  7. Press Enter.
  8. Confirm committed Japanese text appears exactly once.
  9. Press Escape during a new composition.
  10. Confirm no stale composition text remains.
  11. Switch to English input and verify normal typing and shortcuts.
  12. Optional: repeat with Google Japanese Input.

Notes

PR #9730 was used only as design context. This branch is based on upstream master; upstream does not currently expose a main branch.

Verification

  • git diff --check passes.
  • cargo fmt --check and Rust compile checks could not be run in this local environment because cargo/rustc are not installed on PATH.

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 7, 2026

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 @cla-bot check to trigger another check.

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 7, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 7, 2026

@hacsat88-blip

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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 existing KeyDownWithTypedCharacters typed-text fallback when the composing KeyDown is 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,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] Marking the keydown as composing does not stop the 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.

@hacsat88-blip hacsat88-blip closed this by deleting the head repository May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant