=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty-keys.c,v retrieving revision 1.84 retrieving revision 1.85 diff -c -r1.84 -r1.85 *** src/usr.bin/tmux/tty-keys.c 2016/01/19 15:59:12 1.84 --- src/usr.bin/tmux/tty-keys.c 2016/03/02 15:36:03 1.85 *************** *** 1,4 **** ! /* $OpenBSD: tty-keys.c,v 1.84 2016/01/19 15:59:12 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tty-keys.c,v 1.85 2016/03/02 15:36:03 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 477,482 **** --- 477,483 ---- struct utf8_data ud; enum utf8_state more; u_int i; + wchar_t wc; /* Get key buffer. */ buf = EVBUFFER_DATA(tty->event->input); *************** *** 552,558 **** more = utf8_append(&ud, (u_char)buf[i]); if (more != UTF8_DONE) goto discard_key; ! key = utf8_combine(&ud); log_debug("UTF-8 key %.*s %#llx", (int)size, buf, key); goto complete_key; } --- 553,563 ---- more = utf8_append(&ud, (u_char)buf[i]); if (more != UTF8_DONE) goto discard_key; ! ! 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; }