diff options
author | nicm <nicm> | 2015-11-27 15:06:43 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-11-27 15:06:43 +0000 |
commit | 6a2ca34216530c687027cf9e767d2b46c85976e6 (patch) | |
tree | 9f0cb8f7f41ea4e93102bc764f7388ae6b5b0d5c /cmd-list-keys.c | |
parent | ac8678aefe157d7e40c5bcedd12333eaedf0df92 (diff) | |
download | rtmux-6a2ca34216530c687027cf9e767d2b46c85976e6.tar.gz rtmux-6a2ca34216530c687027cf9e767d2b46c85976e6.tar.bz2 rtmux-6a2ca34216530c687027cf9e767d2b46c85976e6.zip |
Do not set a limit on the length of commands when printing them.
Diffstat (limited to 'cmd-list-keys.c')
-rw-r--r-- | cmd-list-keys.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/cmd-list-keys.c b/cmd-list-keys.c index 4355f24e..f0a59c0b 100644 --- a/cmd-list-keys.c +++ b/cmd-list-keys.c @@ -56,7 +56,6 @@ cmd_list_keys_exec(struct cmd *self, struct cmd_q *cmdq) struct key_binding *bd; const char *key, *tablename, *r; char *cp, tmp[BUFSIZ]; - size_t used; int repeat, width, tablewidth, keywidth; if (self->entry == &cmd_list_commands_entry) @@ -115,11 +114,9 @@ cmd_list_keys_exec(struct cmd *self, struct cmd_q *cmdq) strlcat(tmp, " ", sizeof tmp); free(cp); - used = strlen(tmp); - if (used < (sizeof tmp) - 1) { - cmd_list_print(bd->cmdlist, tmp + used, - (sizeof tmp) - used); - } + cp = cmd_list_print(bd->cmdlist); + strlcat(tmp, cp, sizeof tmp); + free(cp); cmdq_print(cmdq, "bind-key %s", tmp); } |