From ed221f32fe8ae30f9109962f2f75e24248a0cc96 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 5 Jan 2025 13:30:33 -0800 Subject: [PATCH] macos: ignore modifier changes while IM is active Fixes #4634 --- macos/Sources/Ghostty/SurfaceView_AppKit.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/macos/Sources/Ghostty/SurfaceView_AppKit.swift b/macos/Sources/Ghostty/SurfaceView_AppKit.swift index 4e0550cc2..cf4357a8c 100644 --- a/macos/Sources/Ghostty/SurfaceView_AppKit.swift +++ b/macos/Sources/Ghostty/SurfaceView_AppKit.swift @@ -945,6 +945,9 @@ extension Ghostty { default: return } + // If we're in the middle of a preedit, don't do anything with mods. + if hasMarkedText() { return } + // The keyAction function will do this AGAIN below which sucks to repeat // but this is super cheap and flagsChanged isn't that common. let mods = Ghostty.ghosttyMods(event.modifierFlags)