From: nicm Date: Mon, 17 Apr 2023 17:58:35 +0000 (+0000) Subject: Make the check if printing is allowed the same as writing which is less X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9d4bd388c3bd902ea7d15c2cb52783ff424bb337;p=openbsd Make the check if printing is allowed the same as writing which is less confusing. --- 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); }