From 7fef12b4910fccf1b3c390f39e620448e5a9415b Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 6 Jan 2009 14:47:56 +0000 Subject: [PATCH] Whoops, add keys in the right place in the tree. --- key-bindings.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/key-bindings.c b/key-bindings.c index 40f3a901..7c0698d7 100644 --- a/key-bindings.c +++ b/key-bindings.c @@ -1,4 +1,4 @@ -/* $Id: key-bindings.c,v 1.39 2009-01-06 14:10:32 nicm Exp $ */ +/* $Id: key-bindings.c,v 1.40 2009-01-06 14:47:56 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -50,11 +50,10 @@ key_bindings_add(int key, struct cmd *cmd) if ((bd = key_bindings_lookup(key)) == NULL) { bd = xmalloc(sizeof *bd); + bd->key = key; SPLAY_INSERT(key_bindings, &key_bindings, bd); } else cmd_free(bd->cmd); - - bd->key = key; bd->cmd = cmd; }