summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2017-04-21 19:33:08 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2017-04-21 19:33:08 +0000
commitbb52e30d609f5329a69c11238c8379bfe522aac8 (patch)
tree7ebc782d32ef57179b33281cb995c3198eb7d2e4 /usr.bin
parent027f553197e77bbc1daa0e1d6492e30afe17a164 (diff)
Key needs to be initialized to zero now it has flags in it.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/key-bindings.c4
-rw-r--r--usr.bin/tmux/server-client.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/tmux/key-bindings.c b/usr.bin/tmux/key-bindings.c
index 39be6aaa6ba..f0e0e1a950d 100644
--- a/usr.bin/tmux/key-bindings.c
+++ b/usr.bin/tmux/key-bindings.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: key-bindings.c,v 1.75 2017/04/21 14:01:19 nicm Exp $ */
+/* $OpenBSD: key-bindings.c,v 1.76 2017/04/21 19:33:07 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -100,7 +100,7 @@ key_bindings_add(const char *name, key_code key, int repeat,
free(bd);
}
- bd = xmalloc(sizeof *bd);
+ bd = xcalloc(1, sizeof *bd);
bd->key = key;
RB_INSERT(key_bindings, &table->key_bindings, bd);
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c
index 08b4b11f4b0..d14900a166d 100644
--- a/usr.bin/tmux/server-client.c
+++ b/usr.bin/tmux/server-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-client.c,v 1.224 2017/04/21 17:22:20 nicm Exp $ */
+/* $OpenBSD: server-client.c,v 1.225 2017/04/21 19:33:07 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -900,6 +900,8 @@ retry:
log_debug("key table %s (no pane)", table->name);
else
log_debug("key table %s (pane %%%u)", table->name, wp->id);
+ if (c->flags & CLIENT_REPEAT)
+ log_debug("currently repeating");
/* Try to see if there is a key binding in the current table. */
bd_find.key = key;