From 01c78be9b858d54143a8f30542919982d723e2f3 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 12 Jun 2020 08:35:01 +0000 Subject: Check if a pane needs to be paused when output is written rather than just when it is queued. --- usr.bin/tmux/control.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'usr.bin/tmux/control.c') diff --git a/usr.bin/tmux/control.c b/usr.bin/tmux/control.c index 151ae909086..ca0b37d5230 100644 --- a/usr.bin/tmux/control.c +++ b/usr.bin/tmux/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.41 2020/06/11 09:55:47 nicm Exp $ */ +/* $OpenBSD: control.c,v 1.42 2020/06/12 08:35:01 nicm Exp $ */ /* * Copyright (c) 2012 Nicholas Marriott @@ -569,6 +569,13 @@ control_write_pending(struct client *c, struct control_pane *cp, size_t limit) } while (used != limit && !TAILQ_EMPTY(&cp->blocks)) { + if (control_check_age(c, wp, cp)) { + if (message != NULL) + evbuffer_free(message); + message = NULL; + break; + } + cb = TAILQ_FIRST(&cp->blocks); if (cb->t < t) age = t - cb->t; -- cgit v1.2.3-59-g8ed1b