=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-send-keys.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- src/usr.bin/tmux/cmd-send-keys.c 2016/11/29 12:54:46 1.34 +++ src/usr.bin/tmux/cmd-send-keys.c 2016/12/08 22:15:37 1.35 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-send-keys.c,v 1.34 2016/11/29 12:54:46 nicm Exp $ */ +/* $OpenBSD: cmd-send-keys.c,v 1.35 2016/12/08 22:15:37 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -63,7 +63,8 @@ struct window_pane *wp = item->state.tflag.wp; struct session *s = item->state.tflag.s; struct mouse_event *m = &item->mouse; - const u_char *keystr; + struct utf8_data *ud, *uc; + wchar_t wc; int i, literal; key_code key; u_int np = 1; @@ -124,8 +125,12 @@ literal = 1; } if (literal) { - for (keystr = args->argv[i]; *keystr != '\0'; keystr++) - window_pane_key(wp, NULL, s, *keystr, NULL); + ud = utf8_fromcstr(args->argv[i]); + for (uc = ud; uc->size != 0; uc++) { + if (utf8_combine(uc, &wc) == UTF8_DONE) + window_pane_key(wp, NULL, s, wc, NULL); + } + free(ud); } }