summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/tty.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2010-08-11 07:34:44 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2010-08-11 07:34:44 +0000
commit0a79760010cafa3e25fd950c0c3d22f8cc649567 (patch)
treeb2104529643980f8fc2f817fb5c896365c61f1c8 /usr.bin/tmux/tty.c
parent1ab3a17cfaaf8e25698adc00e49d111278f44e17 (diff)
Change the way backoff works. Instead of stopping reading from the pty
when the client tty backs up too much, just stop updating the tty and only update the internal screen. Then when the tty recovers, force a redraw. This prevents a dodgy client from causing other clients to go into backoff while still allowing tmux to be responsive (locally) when seeing lots of output.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r--usr.bin/tmux/tty.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index 1d64d2555ea..094be0f99bf 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.88 2010/06/05 16:47:11 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.89 2010/08/11 07:34:43 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -578,7 +578,9 @@ tty_write(void (*cmdfn)(
continue;
if (c->session->curw->window == wp->window) {
- if (c->tty.flags & TTY_FREEZE || c->tty.term == NULL)
+ if (c->tty.term == NULL)
+ continue;
+ if (c->tty.flags & (TTY_FREEZE|TTY_BACKOFF))
continue;
cmdfn(&c->tty, ctx);
}