diff options
author | Thomas Adam <thomas@xteddy.org> | 2016-03-02 18:10:51 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2016-03-02 18:10:51 +0000 |
commit | e304673c65d774bb76e5d55c095c8c8e6b05ff91 (patch) | |
tree | af461e71978b76dad59348d924a37f62b8c0bb7d /tty-keys.c | |
parent | e9d369a09e48ea8f940958025c8444988d31e840 (diff) | |
parent | b8a102d26f41e57b94359627a4df8f22af10c6fa (diff) | |
download | rtmux-e304673c65d774bb76e5d55c095c8c8e6b05ff91.tar.gz rtmux-e304673c65d774bb76e5d55c095c8c8e6b05ff91.tar.bz2 rtmux-e304673c65d774bb76e5d55c095c8c8e6b05ff91.zip |
Merge branch 'obsd-master'
Conflicts:
utf8.c
Diffstat (limited to 'tty-keys.c')
-rw-r--r-- | tty-keys.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -477,6 +477,7 @@ tty_keys_next(struct tty *tty) struct utf8_data ud; enum utf8_state more; u_int i; + wchar_t wc; /* Get key buffer. */ buf = EVBUFFER_DATA(tty->event->input); @@ -552,7 +553,11 @@ first_key: more = utf8_append(&ud, (u_char)buf[i]); if (more != UTF8_DONE) goto discard_key; - key = utf8_combine(&ud); + + if (utf8_combine(&ud, &wc) != UTF8_DONE) + goto discard_key; + key = wc; + log_debug("UTF-8 key %.*s %#llx", (int)size, buf, key); goto complete_key; } |