Fix Ctrl+H deleting committed text instead of composing text during IME input - #790
Conversation
During IME composition (e.g. Japanese input), Ctrl+H should delete composing characters via the IME, not bypass it and send a backspace directly to the terminal. Add a hasMarkedText() check so the fast path is only taken when no IME composition is active, letting interpretKeyEvents() handle the key instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@sminamot is attempting to deploy a commit to the Manaflow Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA single-file change to Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Comment |
Greptile SummaryFixes Ctrl+H incorrectly deleting committed text instead of composing text during IME input by adding a
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 132bc6c |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
As a Japanese IME user, this is a fix I've been wanting. Ctrl+H deleting committed text during composition has been a real pain point. Looking forward to seeing this merged. |
During IME composition (e.g. Japanese input), Ctrl+H should delete composing characters via the IME, not bypass it and send a backspace directly to the terminal. Add a hasMarkedText() check so the fast path is only taken when no IME composition is active, letting interpretKeyEvents() handle the key instead. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Summary
During IME composition (e.g. Japanese input), pressing Ctrl+H deletes already-committed text instead of composing (pre-edit) characters. Backspace key works correctly.
Root cause
The Ctrl key fast path in
keyDown(GhosttyTerminalView.swift:3009) unconditionally bypassesinterpretKeyEvents()and sends key events directly to Ghostty. This skips the IME entirely, so Ctrl+H is treated as a terminal backspace even during composition.Adding a
hasMarkedText()guard to the fast path condition lets Ctrl+key events fall through tointerpretKeyEvents()during IME composition, matching Ghostty upstream behavior.Test plan
./scripts/reload.sh --tag fix-ime-ctrl-hSummary by cubic
Fixes Ctrl+H during IME composition by skipping the Ctrl-key fast path when marked text is present, so composing text is deleted instead of committed text. Ctrl+key events now go through interpretKeyEvents() during composition; normal Ctrl shortcuts remain unchanged outside composition.
Written for commit 132bc6c. Summary will update on new commits.
Summary by CodeRabbit