Sync OpenBSD patchset 778:

Mark repeating keys with "(repeat)" in the key list.
This commit is contained in:
Tiago Cunha 2010-10-24 01:31:57 +00:00
parent bdbd4e28c2
commit 2da0730f78

View File

@ -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 <nicm@users.sourceforge.net> * 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) if (used >= sizeof tmp)
continue; 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); cmd_list_print(bd->cmdlist, tmp + used, (sizeof tmp) - used);
ctx->print(ctx, "%s", tmp); ctx->print(ctx, "%s", tmp);
} }