Handle setMarkedText called from the event loop

Also pass through text with zero key
This commit is contained in:
Kovid Goyal
2022-01-22 16:08:50 +05:30
parent cd9b752926
commit f21ddae94f
2 changed files with 15 additions and 3 deletions

View File

@@ -187,7 +187,8 @@ on_key_input(GLFWkeyevent *ev) {
}
}
if (!w) return;
} else if (w->last_special_key_pressed == key) {
} else if (w->last_special_key_pressed == key && key != 0) {
// key == 0 is sent by the glfw coca backend when text is inserted by the IME outside the key handlers
w->last_special_key_pressed = 0;
debug("ignoring release event for previous press that was handled as shortcut\n");
return;