From 0e7638169c58781079efc0eab384dbe94783283a Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 20 Oct 2010 18:20:37 +0000 Subject: Mark repeating keys with "(repeat)" in the key list. --- usr.bin/tmux/cmd-list-keys.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'usr.bin/tmux') 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 @@ -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); } -- cgit v1.2.3