From 21c17da7e6f4631dc418a7b1768d217ce1ccae2f Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 23 Oct 2007 10:25:57 +0000 Subject: [PATCH] Remove freed keys from array. --- TODO | 1 - key-bindings.c | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/TODO b/TODO index 952fe0b7..150b159b 100644 --- a/TODO +++ b/TODO @@ -49,7 +49,6 @@ - man page - get rid of MAXNAMELEN limits (sessid) - commands: - list clients (session, window, tty?) rename sessions swap windows link/copy windows diff --git a/key-bindings.c b/key-bindings.c index 913d0f14..ec1014d4 100644 --- a/key-bindings.c +++ b/key-bindings.c @@ -1,4 +1,4 @@ -/* $Id: key-bindings.c,v 1.10 2007-10-19 11:10:35 nicm Exp $ */ +/* $Id: key-bindings.c,v 1.11 2007-10-23 10:25:57 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -65,6 +65,8 @@ key_bindings_remove(int key) if (i == ARRAY_LENGTH(&key_bindings)) return; + ARRAY_REMOVE(&key_bindings, i); + cmd_free(bd->cmd); xfree(bd); }