summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2010-10-20 18:20:37 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2010-10-20 18:20:37 +0000
commit0e7638169c58781079efc0eab384dbe94783283a (patch)
tree339cf29522a4521b9370f2f9587f5378aeb1d722 /usr.bin/tmux
parentdd794eba4435099ac0c0f6a7af355cedbe192fac (diff)
Mark repeating keys with "(repeat)" in the key list.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/cmd-list-keys.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd-list-keys.c b/usr.bin/tmux/cmd-list-keys.c
index 0c67be263de..62aef68dde0 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.11 2009/12/03 22:50:10 nicm Exp $ */
+/* $OpenBSD: cmd-list-keys.c,v 1.12 2010/10/20 18:20:36 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -80,6 +80,11 @@ cmd_list_keys_exec(struct cmd *self, struct cmd_ctx *ctx)
if (used >= sizeof tmp)
continue;
}
+ if (bd->can_repeat) {
+ used = strlcat(tmp, "(repeat) ", sizeof tmp);
+ if (used >= sizeof tmp)
+ continue;
+ }
cmd_list_print(bd->cmdlist, tmp + used, (sizeof tmp) - used);
ctx->print(ctx, "%s", tmp);
}