diff options
author | Thomas Adam <thomas@xteddy.org> | 2020-04-20 17:42:29 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2020-04-20 17:42:29 +0100 |
commit | c706aadf52f746b695aed34297ad0a910d74eb1b (patch) | |
tree | 43d08451081e1d8efbc14f784453b4369f0d5821 /cmd-show-messages.c | |
parent | 3898d4e7c872a20d9bb22b44fd3449d21281a931 (diff) | |
parent | 135bb1edeeab3faae8001100aa7c173be9aa91e1 (diff) | |
download | rtmux-c706aadf52f746b695aed34297ad0a910d74eb1b.tar.gz rtmux-c706aadf52f746b695aed34297ad0a910d74eb1b.tar.bz2 rtmux-c706aadf52f746b695aed34297ad0a910d74eb1b.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-show-messages.c')
-rw-r--r-- | cmd-show-messages.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/cmd-show-messages.c b/cmd-show-messages.c index bd81f555..02fdb9cd 100644 --- a/cmd-show-messages.c +++ b/cmd-show-messages.c @@ -42,22 +42,24 @@ const struct cmd_entry cmd_show_messages_entry = { .exec = cmd_show_messages_exec }; -static int cmd_show_messages_terminals(struct cmdq_item *, int); - static int -cmd_show_messages_terminals(struct cmdq_item *item, int blank) +cmd_show_messages_terminals(struct cmd *self, struct cmdq_item *item, int blank) { + struct args *args = cmd_get_args(self); + struct client *tc = cmdq_get_target_client(item); struct tty_term *term; u_int i, n; n = 0; LIST_FOREACH(term, &tty_terms, entry) { + if (args_has(args, 't') && term != tc->tty.term) + continue; if (blank) { cmdq_print(item, "%s", ""); blank = 0; } - cmdq_print(item, "Terminal %u: %s [references=%u, flags=0x%x]:", - n, term->name, term->references, term->flags); + cmdq_print(item, "Terminal %u: %s for %s, flags=0x%x:", n, + term->name, term->tty->client->name, term->flags); n++; for (i = 0; i < tty_term_ncodes(); i++) cmdq_print(item, "%s", tty_term_describe(term, i)); @@ -76,7 +78,7 @@ cmd_show_messages_exec(struct cmd *self, struct cmdq_item *item) done = blank = 0; if (args_has(args, 'T')) { - blank = cmd_show_messages_terminals(item, blank); + blank = cmd_show_messages_terminals(self, item, blank); done = 1; } if (args_has(args, 'J')) { |