=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-show-messages.c,v retrieving revision 1.31 retrieving revision 1.32 diff -c -r1.31 -r1.32 *** src/usr.bin/tmux/cmd-show-messages.c 2020/04/13 20:54:15 1.31 --- src/usr.bin/tmux/cmd-show-messages.c 2020/04/20 13:25:36 1.32 *************** *** 1,4 **** ! /* $OpenBSD: cmd-show-messages.c,v 1.31 2020/04/13 20:54:15 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-show-messages.c,v 1.32 2020/04/20 13:25:36 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott *************** *** 43,64 **** .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) { struct tty_term *term; u_int i, n; n = 0; LIST_FOREACH(term, &tty_terms, entry) { 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); n++; for (i = 0; i < tty_term_ncodes(); i++) cmdq_print(item, "%s", tty_term_describe(term, i)); --- 43,66 ---- .exec = cmd_show_messages_exec }; static int ! 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 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)); *************** *** 77,83 **** done = blank = 0; if (args_has(args, 'T')) { ! blank = cmd_show_messages_terminals(item, blank); done = 1; } if (args_has(args, 'J')) { --- 79,85 ---- done = blank = 0; if (args_has(args, 'T')) { ! blank = cmd_show_messages_terminals(self, item, blank); done = 1; } if (args_has(args, 'J')) {