aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authornicm <nicm>2020-04-18 07:32:53 +0000
committernicm <nicm>2020-04-18 07:32:53 +0000
commitb0a37e7514f2e08a9a8315cc68add4f0a53ed2af (patch)
tree8ddae5f75aa303edfb7a9039ff101ba846dcc0be /tty.c
parente153b928ff5139fdc39b45db493a1c81d2175d21 (diff)
downloadrtmux-b0a37e7514f2e08a9a8315cc68add4f0a53ed2af.tar.gz
rtmux-b0a37e7514f2e08a9a8315cc68add4f0a53ed2af.tar.bz2
rtmux-b0a37e7514f2e08a9a8315cc68add4f0a53ed2af.zip
Bring back previons fix to only redraw panes that need it after a redraw
is deferred, but clear the pane flags when they are actually redrawn rather than every time.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tty.c b/tty.c
index 92827f5d..cdfedf6c 100644
--- a/tty.c
+++ b/tty.c
@@ -944,6 +944,7 @@ tty_fake_bce(const struct tty *tty, struct window_pane *wp, u_int bg)
static void
tty_redraw_region(struct tty *tty, const struct tty_ctx *ctx)
{
+ struct client *c = tty->client;
struct window_pane *wp = ctx->wp;
struct screen *s = wp->screen;
u_int i;
@@ -953,6 +954,7 @@ tty_redraw_region(struct tty *tty, const struct tty_ctx *ctx)
* likely to be followed by some more scrolling.
*/
if (tty_large_region(tty, ctx)) {
+ log_debug("%s: %s, large redraw of %%%u", __func__, c->name, wp->id);
wp->flags |= PANE_REDRAW;
return;
}
@@ -1484,6 +1486,14 @@ tty_write(void (*cmdfn)(struct tty *, const struct tty_ctx *),
TAILQ_FOREACH(c, &clients, entry) {
if (!tty_client_ready(c, wp))
continue;
+ if (c->flags & CLIENT_REDRAWPANES) {
+ /*
+ * Redraw is already deferred to redraw another pane -
+ * redraw this one also when that happens.
+ */
+ wp->flags |= PANE_REDRAW;
+ break;
+ }
ctx->bigger = tty_window_offset(&c->tty, &ctx->ox, &ctx->oy,
&ctx->sx, &ctx->sy);