diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-05-26 08:55:39 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-05-26 08:55:39 +0000 |
commit | f36bc73561735669d6b58c8baa6c9f4af9b41cda (patch) | |
tree | 5a4703e26b726873aee170b0cfb68438b10aba88 /usr.bin | |
parent | 70c2da61cf08467d767116456181b851db49bcb0 (diff) |
Set up UTF-8 data for ASCII keys correctly.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/status.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c index d577ed2ea39..fe9d5b6957d 100644 --- a/usr.bin/tmux/status.c +++ b/usr.bin/tmux/status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.214 2020/05/25 18:57:25 nicm Exp $ */ +/* $OpenBSD: status.c,v 1.215 2020/05/26 08:55:38 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -1275,7 +1275,10 @@ process_key: append_key: if (key <= 0x1f || key >= KEYC_BASE) return (0); - utf8_to_data(key, &tmp); + if (key < 0x7f) + utf8_set(&tmp, key); + else + utf8_to_data(key, &tmp); c->prompt_buffer = xreallocarray(c->prompt_buffer, size + 2, sizeof *c->prompt_buffer); |