diff options
author | 2010-10-20 18:20:36 +0000 | |
---|---|---|
committer | 2010-10-20 18:20:36 +0000 | |
commit | 158b33a951d464ad3a0885f6d2c12028cbf5045f (patch) | |
tree | 7da49d8f4165266371390d92917159835cda4780 /usr.bin/tmux/cmd-list-keys.c | |
parent | Since on shutdown fib_sync is forced to 1 to remove the multicast route (diff) | |
download | wireguard-openbsd-158b33a951d464ad3a0885f6d2c12028cbf5045f.tar.xz wireguard-openbsd-158b33a951d464ad3a0885f6d2c12028cbf5045f.zip |
Mark repeating keys with "(repeat)" in the key list.
Diffstat (limited to 'usr.bin/tmux/cmd-list-keys.c')
-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); } |