macos: Fix IME commit being lost when a key ends composition (#8109)

Clearing ime_text before interpretKeyEvents makes hasMarkedText()
answer NO while a composition is active. AppKit consults it when
applying text that an input method commits during the key event,
and discards commit text arriving together with a function key.
Korean IMEs finalize the composing syllable when an arrow key is
pressed, so that syllable was lost instead of being committed.

ime_text is maintained by setMarkedText/insertText/unmarkText, so
removing the pre-clear leaves the state correct.

refs: #6907
This commit is contained in:
Kiyoon Kim authored and GitHub committed 2026-11-20 09:46:46 +01:00
1 parent 3bbf48b1bf
commit 630ba680e5
1 file changed
-1
-1
View File
@@ -2722,7 +2722,6 @@ impl WindowView {
let mut inner = myself.inner.borrow_mut();
inner.key_is_down.replace(key_is_down);
inner.ime_state = ImeDisposition::None;
inner.ime_text.clear();
}
unsafe {