diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2023-03-31 09:34:04 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2023-03-31 09:34:04 +0000 |
| commit | e71e7f5cf6452e9f14dd93a72ed9afca98ea13b3 (patch) | |
| tree | 0b590e56a2b0dd507cebf55c76e0e2702b811e68 /input.c | |
| parent | changelog: typo: now -> not (diff) | |
input: kitty: don’t treat zero-length utf8/utf32 strings as text
This is a regression introduced in 3215d54f31c9e339598a34c9fa43f3dc3c5d1e42
Symptoms: e.g. arrow keys not working in vim/neovim
Diffstat (limited to 'input.c')
| -rw-r--r-- | input.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1125,7 +1125,7 @@ kitty_kbd_protocol(struct seat *seat, struct terminal *term, const uint8_t *const utf8 = ctx->utf8.buf; const size_t count = ctx->utf8.count; - bool is_text = utf32 != NULL && (effective & ~caps_num) == 0; + bool is_text = count > 0 && utf32 != NULL && (effective & ~caps_num) == 0; for (size_t i = 0; utf32[i] != U'\0'; i++) { if (!iswprint(utf32[i])) { is_text = false; |
