summaryrefslogtreecommitdiffstats
authortcunha <tcunha>2010-10-24 01:31:57 (GMT)
committer Raghavendra D Prabhu <[email protected]>2011-01-02 18:59:31 (GMT)
commit780d805bc328f63df18c4c605de00aa41e2df524 (patch) (side-by-side diff)
tree05652194e80f11e9b56f0f301c431f12f8dc6613
parent77a836a37ad9bc764c08cacfd2986cd0242c0d62 (diff)
downloadtmux-old-780d805bc328f63df18c4c605de00aa41e2df524.zip
tmux-old-780d805bc328f63df18c4c605de00aa41e2df524.tar.gz
tmux-old-780d805bc328f63df18c4c605de00aa41e2df524.tar.bz2
Sync OpenBSD patchset 778:
Mark repeating keys with "(repeat)" in the key list.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--cmd-list-keys.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd-list-keys.c b/cmd-list-keys.c
index 4a02b1c..b13cc94 100644
--- a/cmd-list-keys.c
+++ b/cmd-list-keys.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-list-keys.c,v 1.24 2009/12/04 22:14:47 tcunha Exp $ */
+/* $Id: cmd-list-keys.c,v 1.25 2010/10/24 01:31:57 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <[email protected]>
@@ -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);
}