summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2020-06-12 08:35:02 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2020-06-12 08:35:02 +0000
commit2b260ef5f7d4bd780660e5a05c7e676394f3f64f (patch)
tree2a2002adb8b1ad6c232db03f925756fff98390e5 /usr.bin/tmux
parenta6c7106108706bc463f7a9b8ce68012dc11b6af4 (diff)
Check if a pane needs to be paused when output is written rather than
just when it is queued.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/control.c9
1 files changed, 8 insertions, 1 deletions
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 <nicholas.marriott@gmail.com>
@@ -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;