summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-unbind-key.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2015-11-12 11:05:34 +0000
committernicm <nicm@openbsd.org>2015-11-12 11:05:34 +0000
commit885a46987fa37c3ab9f797b657cf591a414f800f (patch)
tree8affdbe66f542715691e2756b150ba5e8fd64eff /usr.bin/tmux/cmd-unbind-key.c
parentcan just IFQ_DEQUEUE instead of POLL followed immediately by DEQUEUE (diff)
downloadwireguard-openbsd-885a46987fa37c3ab9f797b657cf591a414f800f.tar.xz
wireguard-openbsd-885a46987fa37c3ab9f797b657cf591a414f800f.zip
Support UTF-8 key bindings by expanding the key type from int to
uint64_t and converting UTF-8 to Unicode on input and the reverse on output. (This allows key bindings, there are still omissions - the largest being that the various prompts do not accept UTF-8.)
Diffstat (limited to 'usr.bin/tmux/cmd-unbind-key.c')
-rw-r--r--usr.bin/tmux/cmd-unbind-key.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/tmux/cmd-unbind-key.c b/usr.bin/tmux/cmd-unbind-key.c
index b56ea8f604b..02ddee2fde7 100644
--- a/usr.bin/tmux/cmd-unbind-key.c
+++ b/usr.bin/tmux/cmd-unbind-key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-unbind-key.c,v 1.21 2015/04/20 15:34:56 nicm Exp $ */
+/* $OpenBSD: cmd-unbind-key.c,v 1.22 2015/11/12 11:05:34 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -26,8 +26,9 @@
* Unbind key from command.
*/
-enum cmd_retval cmd_unbind_key_exec(struct cmd *, struct cmd_q *);
-enum cmd_retval cmd_unbind_key_mode_table(struct cmd *, struct cmd_q *, int);
+enum cmd_retval cmd_unbind_key_exec(struct cmd *, struct cmd_q *);
+enum cmd_retval cmd_unbind_key_mode_table(struct cmd *, struct cmd_q *,
+ key_code);
const struct cmd_entry cmd_unbind_key_entry = {
"unbind-key", "unbind",
@@ -41,7 +42,7 @@ enum cmd_retval
cmd_unbind_key_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
- int key;
+ key_code key;
const char *tablename;
if (!args_has(args, 'a')) {
@@ -95,7 +96,7 @@ cmd_unbind_key_exec(struct cmd *self, struct cmd_q *cmdq)
}
enum cmd_retval
-cmd_unbind_key_mode_table(struct cmd *self, struct cmd_q *cmdq, int key)
+cmd_unbind_key_mode_table(struct cmd *self, struct cmd_q *cmdq, key_code key)
{
struct args *args = self->args;
const char *tablename;