summaryrefslogtreecommitdiffstats
path: root/cmd-list-keys.c
diff options
context:
space:
mode:
authornicm <nicm>2020-04-13 20:51:57 +0000
committernicm <nicm>2020-04-13 20:51:57 +0000
commit3f7f9a0e20522c73e33480673496240f1bac724b (patch)
treec0ec19a026014bfd6981622ecd9ee2783344ef25 /cmd-list-keys.c
parent187277eaadc4a675659bf7ede88f50bfe6cc7be9 (diff)
Make client -c and -t handling common in cmd-queue.c and try to be
clearer about whether the client is the target client (must have a session) or not.
Diffstat (limited to 'cmd-list-keys.c')
-rw-r--r--cmd-list-keys.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd-list-keys.c b/cmd-list-keys.c
index cfdceee7..1141bbb5 100644
--- a/cmd-list-keys.c
+++ b/cmd-list-keys.c
@@ -85,7 +85,7 @@ static int
cmd_list_keys_print_notes(struct cmdq_item *item, struct args *args,
const char *tablename, u_int keywidth, key_code only, const char *prefix)
{
- struct client *c = cmd_find_client(item, NULL, 1);
+ struct client *tc = cmdq_get_target_client(item);
struct key_table *table;
struct key_binding *bd;
const char *key;
@@ -111,8 +111,8 @@ cmd_list_keys_print_notes(struct cmdq_item *item, struct args *args,
else
note = xstrdup(bd->note);
tmp = utf8_padcstr(key, keywidth + 1);
- if (args_has(args, '1') && c != NULL)
- status_message_set(c, "%s%s%s", prefix, tmp, note);
+ if (args_has(args, '1') && tc != NULL)
+ status_message_set(tc, "%s%s%s", prefix, tmp, note);
else
cmdq_print(item, "%s%s%s", prefix, tmp, note);
free(tmp);