summaryrefslogtreecommitdiffstats
path: root/cmd-list-keys.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-07-28 23:19:06 +0000
committerTiago Cunha <tcunha@gmx.com>2009-07-28 23:19:06 +0000
commit522fc94d12753466dd5351918642114bbc475e35 (patch)
treeda2c829f9317cd22553241a5d5c7e54bb5ce761d /cmd-list-keys.c
parentdeaba448353857d6520e13246c4ea9445af9bbb3 (diff)
Sync OpenBSD patchset 194:
Final pieces of mode key rebinding: bind-key and unbind-key now accept a -t argument to modify a table.
Diffstat (limited to 'cmd-list-keys.c')
-rw-r--r--cmd-list-keys.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/cmd-list-keys.c b/cmd-list-keys.c
index 5fe4f564..4642ae44 100644
--- a/cmd-list-keys.c
+++ b/cmd-list-keys.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-list-keys.c,v 1.19 2009-07-28 23:11:18 tcunha Exp $ */
+/* $Id: cmd-list-keys.c,v 1.20 2009-07-28 23:19:06 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -92,11 +92,7 @@ cmd_list_keys_table(struct cmd *self, struct cmd_ctx *ctx)
const char *key, *cmdstr, *mode;
int width, keywidth;
- for (mtab = mode_key_tables; mtab->name != NULL; mtab++) {
- if (strcasecmp(data->target, mtab->name) == 0)
- break;
- }
- if (mtab->name == NULL) {
+ if ((mtab = mode_key_findtable(data->target)) == NULL) {
ctx->error(ctx, "unknown key table: %s", data->target);
return (-1);
}