Also deal with setMarkedText called from event loop with actual marked text

This commit is contained in:
Kovid Goyal 2022-01-22 16:13:44 +05:30
parent f21ddae94f
commit 3b15b46d08
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1397,6 +1397,12 @@ is_ascii_control_char(char x) {
[markedText release];
markedText = [[NSMutableAttributedString alloc] initWithString:string];
}
if (!in_key_handler) {
debug_key("updating IME text in kitty from setMarkedText called from event loop: %s\n", _glfw.ns.text);
GLFWkeyevent glfw_keyevent = {.text=_glfw.ns.text, .ime_state = GLFW_IME_PREEDIT_CHANGED};
_glfwInputKeyboard(window, &glfw_keyevent);
_glfw.ns.text[0] = 0;
}
}
- (void)unmarkText