summaryrefslogtreecommitdiffstats
path: root/server-client.c
diff options
context:
space:
mode:
authornicm <nicm>2017-05-09 13:04:36 +0000
committernicm <nicm>2017-05-09 13:04:36 +0000
commit3b35daacf734dc824b6101e54d62067fde6016b8 (patch)
treea2a689b2a562dd902d057b5e587fcc8e083b5663 /server-client.c
parent18f36906a9e40ebcf9705fa9deb197bc4a1f813a (diff)
If the current screen was complex enough, it was possible to make redraw
itself hit the "terminal can't keep up" check. To avoid this, record how much data we send during redraw (we know we will be starting with 0) and skip the check until it has been flushed. GitHub issue 912.
Diffstat (limited to 'server-client.c')
-rw-r--r--server-client.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/server-client.c b/server-client.c
index 72b5d312..ae8e0d6e 100644
--- a/server-client.c
+++ b/server-client.c
@@ -1314,6 +1314,16 @@ server_client_check_redraw(struct client *c)
c->flags &= ~(CLIENT_REDRAW|CLIENT_BORDERS|CLIENT_STATUS|
CLIENT_STATUSFORCE);
+
+ if (needed) {
+ /*
+ * We would have deferred the redraw unless the output buffer
+ * was empty, so we can record how many bytes the redraw
+ * generated.
+ */
+ c->redraw = EVBUFFER_LENGTH(tty->out);
+ log_debug("%s: redraw added %zu bytes", c->name, c->redraw);
+ }
}
/* Set client title. */