From bb52e30d609f5329a69c11238c8379bfe522aac8 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 21 Apr 2017 19:33:08 +0000 Subject: Key needs to be initialized to zero now it has flags in it. --- usr.bin/tmux/key-bindings.c | 4 ++-- usr.bin/tmux/server-client.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'usr.bin/tmux') 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; -- cgit v1.2.3