From 9d4bd388c3bd902ea7d15c2cb52783ff424bb337 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 17 Apr 2023 17:58:35 +0000 Subject: [PATCH] Make the check if printing is allowed the same as writing which is less confusing. --- usr.bin/tmux/file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/tmux/file.c b/usr.bin/tmux/file.c index c993f39bd83..a3dacb556cf 100644 --- a/usr.bin/tmux/file.c +++ b/usr.bin/tmux/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.14 2023/01/06 07:09:27 nicm Exp $ */ +/* $OpenBSD: file.c,v 1.15 2023/04/17 17:58:35 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott @@ -177,9 +177,9 @@ file_fire_read(struct client_file *cf) int file_can_print(struct client *c) { - if (c == NULL) - return (0); - if (c->session != NULL && (~c->flags & CLIENT_CONTROL)) + if (c == NULL || + (c->flags & CLIENT_ATTACHED) || + (c->flags & CLIENT_CONTROL)) return (0); return (1); } -- 2.20.1