aboutsummaryrefslogtreecommitdiff
path: root/screen-write.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2020-04-20 17:43:20 +0100
committerThomas Adam <thomas@xteddy.org>2020-04-20 17:43:20 +0100
commit32c3fe40ebbc35285c2b0121dfb3dc5623f9fb73 (patch)
treeff0738166252ad1638a1e5351e1c86a9c08eca39 /screen-write.c
parentc706aadf52f746b695aed34297ad0a910d74eb1b (diff)
parent4a5182e6658907f876581fbcf4c774bf86d0d953 (diff)
downloadrtmux-32c3fe40ebbc35285c2b0121dfb3dc5623f9fb73.tar.gz
rtmux-32c3fe40ebbc35285c2b0121dfb3dc5623f9fb73.tar.bz2
rtmux-32c3fe40ebbc35285c2b0121dfb3dc5623f9fb73.zip
Merge branch 'obsd-master'
Diffstat (limited to 'screen-write.c')
-rw-r--r--screen-write.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/screen-write.c b/screen-write.c
index 55d399a7..98a4a701 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -118,8 +118,9 @@ screen_write_initctx(struct screen_write_ctx *ctx, struct tty_ctx *ttyctx,
ttyctx->orlower = s->rlower;
ttyctx->orupper = s->rupper;
- if (sync && !ctx->sync && ttyctx->wp != NULL) {
- log_debug("%s: starting sync", __func__);
+ if (ctx->wp != NULL &&
+ !ctx->sync &&
+ (sync || ctx->wp != ctx->wp->window->active)) {
tty_write(tty_cmd_syncstart, ttyctx);
ctx->sync = 1;
}
@@ -184,8 +185,6 @@ screen_write_start(struct screen_write_ctx *ctx, struct window_pane *wp,
void
screen_write_stop(struct screen_write_ctx *ctx)
{
- struct tty_ctx ttyctx;
-
screen_write_collect_end(ctx);
screen_write_collect_flush(ctx, 0, __func__);
@@ -196,12 +195,6 @@ screen_write_stop(struct screen_write_ctx *ctx)
ctx->wp->skipped += ctx->skipped;
}
- if (ctx->sync) {
- screen_write_initctx(ctx, &ttyctx, 0);
- tty_write(tty_cmd_syncend, &ttyctx);
- log_debug("%s: ending sync", __func__);
- }
-
free(ctx->item);
}