mirror of
https://github.com/tmux/tmux.git
synced 2024-10-31 22:58:49 +00:00
Support -1 without -N for list-keys.
This commit is contained in:
parent
d578cf8d3f
commit
9789ea3fb4
@ -148,6 +148,7 @@ static enum cmd_retval
|
||||
cmd_list_keys_exec(struct cmd *self, struct cmdq_item *item)
|
||||
{
|
||||
struct args *args = cmd_get_args(self);
|
||||
struct client *tc = cmdq_get_target_client(item);
|
||||
struct key_table *table;
|
||||
struct key_binding *bd;
|
||||
const char *tablename, *r, *keystr;
|
||||
@ -296,9 +297,15 @@ cmd_list_keys_exec(struct cmd *self, struct cmdq_item *item)
|
||||
strlcat(tmp, cp, tmpsize);
|
||||
free(cp);
|
||||
|
||||
if (args_has(args, '1') && tc != NULL) {
|
||||
status_message_set(tc, -1, 1, 0, "bind-key %s",
|
||||
tmp);
|
||||
} else
|
||||
cmdq_print(item, "bind-key %s", tmp);
|
||||
|
||||
free(key);
|
||||
|
||||
if (args_has(args, '1'))
|
||||
break;
|
||||
bd = key_bindings_next(table, bd);
|
||||
}
|
||||
table = key_bindings_next_table(table);
|
||||
|
Loading…
Reference in New Issue
Block a user