Use the internal representation for UTF-8 keys instead of wchar_t and

drop some code only needed for that.
This commit is contained in:
nicm
2020-05-25 18:57:24 +00:00
parent 35779d655d
commit 6f03e49e68
9 changed files with 48 additions and 80 deletions

View File

@ -469,10 +469,9 @@ input_key(struct screen *s, struct bufferevent *bev, key_code key)
return (0);
}
if (justkey > 0x7f && justkey < KEYC_BASE) {
if (utf8_split(justkey, &ud) != UTF8_DONE)
return (-1);
if (key & KEYC_META)
bufferevent_write(bev, "\033", 1);
utf8_to_data(justkey, &ud);
bufferevent_write(bev, ud.data, ud.size);
return (0);
}