Dont leak a reference to input_source_at_last_key_event

This commit is contained in:
Kovid Goyal 2022-01-19 12:06:54 +05:30
parent 0ae928f409
commit 21bc5bf8c0
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1103,6 +1103,8 @@ is_ascii_control_char(char x) {
GLFWkeyevent dummy = {.action = GLFW_RELEASE, .ime_state = GLFW_IME_PREEDIT_CHANGED};
window->ns.deadKeyState = 0;
_glfwInputKeyboard(window, &dummy); // clear pre-edit text
[input_source_at_last_key_event release];
input_source_at_last_key_event = nil;
}
input_source_at_last_key_event = [inpctx.selectedKeyboardInputSource retain];
[self unmarkText];