diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-10-20 18:20:37 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-10-20 18:20:37 +0000 |
commit | 0e7638169c58781079efc0eab384dbe94783283a (patch) | |
tree | 339cf29522a4521b9370f2f9587f5378aeb1d722 /usr.bin/tmux | |
parent | dd794eba4435099ac0c0f6a7af355cedbe192fac (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.c | 7 |
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); } |