summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-list-keys.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/cmd-list-keys.c')
-rw-r--r--usr.bin/tmux/cmd-list-keys.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.bin/tmux/cmd-list-keys.c b/usr.bin/tmux/cmd-list-keys.c
index 31129f30dd7..f4b73e9017c 100644
--- a/usr.bin/tmux/cmd-list-keys.c
+++ b/usr.bin/tmux/cmd-list-keys.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-list-keys.c,v 1.6 2009/07/28 07:03:32 nicm Exp $ */
+/* $OpenBSD: cmd-list-keys.c,v 1.7 2009/07/28 17:05:10 nicm 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);
}