Skip Ctrl fast path during IME composition (#790)
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>
This commit is contained in:
parent
2712cabac9
commit
bf28f5df4b
1 changed files with 1 additions and 1 deletions
|
|
@ -3992,7 +3992,7 @@ class GhosttyNSView: NSView, NSUserInterfaceValidations {
|
|||
// AppKit text interpretation and send a single deterministic Ghostty key event.
|
||||
// This avoids intermittent drops after rapid split close/reparent transitions.
|
||||
let flags = event.modifierFlags.intersection(.deviceIndependentFlagsMask)
|
||||
if flags.contains(.control) && !flags.contains(.command) && !flags.contains(.option) {
|
||||
if flags.contains(.control) && !flags.contains(.command) && !flags.contains(.option) && !hasMarkedText() {
|
||||
ghostty_surface_set_focus(surface, true)
|
||||
var keyEvent = ghostty_input_key_s()
|
||||
keyEvent.action = event.isARepeat ? GHOSTTY_ACTION_REPEAT : GHOSTTY_ACTION_PRESS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue