diff options
author | Josh Rahm <rahm@google.com> | 2023-01-27 23:04:47 +0000 |
---|---|---|
committer | Josh Rahm <rahm@google.com> | 2023-01-27 23:04:47 +0000 |
commit | e64dc03ff7b867826c7fc76d6fff210ad3382e33 (patch) | |
tree | 9cf71b02a7ee8f6d39ae1207201dc0745bdb8be5 /cmd-list-keys.c | |
parent | fb15fd116097b98c1b839cfdc76a7d84e206e6d5 (diff) | |
parent | f5af3cfb211c12897b15e3b5a3b29c4bbb0493a8 (diff) | |
download | rtmux-e64dc03ff7b867826c7fc76d6fff210ad3382e33.tar.gz rtmux-e64dc03ff7b867826c7fc76d6fff210ad3382e33.tar.bz2 rtmux-e64dc03ff7b867826c7fc76d6fff210ad3382e33.zip |
Merge remote-tracking branch 'upstream/master' into rahm
Diffstat (limited to 'cmd-list-keys.c')
-rw-r--r-- | cmd-list-keys.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/cmd-list-keys.c b/cmd-list-keys.c index ae9f995c..395b147c 100644 --- a/cmd-list-keys.c +++ b/cmd-list-keys.c @@ -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); - cmdq_print(item, "bind-key %s", tmp); - + 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); |