Slightly improve debug text
This commit is contained in:
parent
393e5eb158
commit
02e1272502
@ -1396,7 +1396,7 @@ is_ascii_control_char(char x) {
|
||||
markedText = [[NSMutableAttributedString alloc] initWithString:string];
|
||||
}
|
||||
if (!in_key_handler || in_key_handler == 2) {
|
||||
debug_key("Updating IME text in kitty from setMarkedText called from event loop or flagsChanged: %s\n", _glfw.ns.text);
|
||||
debug_key("Updating IME text in kitty from setMarkedText called from %s: %s\n", in_key_handler ? "flagsChanged" : "event loop", _glfw.ns.text);
|
||||
GLFWkeyevent glfw_keyevent = {.text=[[markedText string] UTF8String], .ime_state = GLFW_IME_PREEDIT_CHANGED};
|
||||
_glfwInputKeyboard(window, &glfw_keyevent);
|
||||
_glfw.ns.text[0] = 0;
|
||||
@ -1477,7 +1477,7 @@ void _glfwPlatformUpdateIMEState(_GLFWwindow *w, const GLFWIMEUpdateEvent *ev) {
|
||||
_glfw.ns.text[sizeof(_glfw.ns.text) - 1] = 0;
|
||||
if ((!in_key_handler || in_key_handler == 2) && _glfw.ns.text[0]) {
|
||||
if (!is_ascii_control_char(_glfw.ns.text[0])) {
|
||||
debug_key("Sending text to kitty from insertText called from called from event loop or flagsChanged: %s\n", _glfw.ns.text);
|
||||
debug_key("Sending text to kitty from insertText called from %s: %s\n", in_key_handler ? "flagsChanged" : "event loop", _glfw.ns.text);
|
||||
GLFWkeyevent glfw_keyevent = {.text=_glfw.ns.text, .ime_state=GLFW_IME_COMMIT_TEXT};
|
||||
_glfwInputKeyboard(window, &glfw_keyevent);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user