summaryrefslogtreecommitdiffstats
path: root/input-keys.c
diff options
context:
space:
mode:
authornicm <nicm>2020-05-25 18:57:24 +0000
committernicm <nicm>2020-05-25 18:57:24 +0000
commit6f03e49e68dfe0d9c0c7d49079c4383b26aca916 (patch)
tree86a94f09a878fe2d32cd3ef29a69db242208897f /input-keys.c
parent35779d655d7eec4b904eeb3a670bbef02aba016d (diff)
Use the internal representation for UTF-8 keys instead of wchar_t and
drop some code only needed for that.
Diffstat (limited to 'input-keys.c')
-rw-r--r--input-keys.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/input-keys.c b/input-keys.c
index 7a922ab8..d1fbbfcf 100644
--- a/input-keys.c
+++ b/input-keys.c
@@ -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);
}