mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 18:51:41 +02:00
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:
@@ -35,6 +35,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
|||||||
|
|
||||||
- Fix window title for minimized windows not being updated (:iss:`1332`)
|
- 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]
|
0.13.3 [2019-01-19]
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|||||||
@@ -1033,7 +1033,9 @@ is_ascii_control_char(char x) {
|
|||||||
characters = [string string];
|
characters = [string string];
|
||||||
else
|
else
|
||||||
characters = (NSString*) string;
|
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;
|
_glfw.ns.text[sizeof(_glfw.ns.text) - 1] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user