mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
input: kitty: don’t treat zero-length utf8/utf32 strings as text
This is a regression introduced in 3215d54f31
Symptoms: e.g. arrow keys not working in vim/neovim
This commit is contained in:
parent
deb43c8dc3
commit
e71e7f5cf6
1 changed files with 1 additions and 1 deletions
2
input.c
2
input.c
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue