From: nicm Date: Fri, 21 Apr 2017 19:33:07 +0000 (+0000) Subject: Key needs to be initialized to zero now it has flags in it. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2974176a4b8aebcccdc0917bef0810edd29a95d6;p=openbsd Key needs to be initialized to zero now it has flags in it. --- 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 @@ -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 @@ -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;