macOS: Fix using multi-key sequences to input text ignoring the first few key presses if the sequence is aborted
Fixes #1311
This commit is contained in:
parent
3b25081353
commit
b40ca5800d
@ -35,6 +35,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
||||
|
||||
- Fix window title for minimized windows not being updated (:iss:`1332`)
|
||||
|
||||
- macOS: Fix using multi-key sequences to input text ignoring the
|
||||
first few key presses if the sequence is aborted (:iss:`1311`)
|
||||
|
||||
|
||||
0.13.3 [2019-01-19]
|
||||
------------------------------
|
||||
|
||||
@ -1033,7 +1033,9 @@ is_ascii_control_char(char x) {
|
||||
characters = [string string];
|
||||
else
|
||||
characters = (NSString*) string;
|
||||
snprintf(_glfw.ns.text, sizeof(_glfw.ns.text), "%s", [characters UTF8String]);
|
||||
// insertText can be called multiple times for a single key event
|
||||
char *s = _glfw.ns.text + strnlen(_glfw.ns.text, sizeof(_glfw.ns.text));
|
||||
snprintf(s, sizeof(_glfw.ns.text) - (s - _glfw.ns.text), "%s", [characters UTF8String]);
|
||||
_glfw.ns.text[sizeof(_glfw.ns.text) - 1] = 0;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user