diff options
author | Thomas Adam <thomas@xteddy.org> | 2020-04-16 16:01:35 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2020-04-16 16:01:35 +0100 |
commit | 5e38d262579662f33570c520b6661e15c215f702 (patch) | |
tree | 99b52461946c4a128d6a475f81ae0d4a8ce022c7 /screen-write.c | |
parent | b3cadf826034ec356d0bf3dda26b7699bff4649c (diff) | |
parent | 5ec80bd249a37147207ec2ef420086336ccf78a8 (diff) | |
download | rtmux-5e38d262579662f33570c520b6661e15c215f702.tar.gz rtmux-5e38d262579662f33570c520b6661e15c215f702.tar.bz2 rtmux-5e38d262579662f33570c520b6661e15c215f702.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'screen-write.c')
-rw-r--r-- | screen-write.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/screen-write.c b/screen-write.c index b2f9e223..3e7fa66b 100644 --- a/screen-write.c +++ b/screen-write.c @@ -100,7 +100,8 @@ void screen_write_start(struct screen_write_ctx *ctx, struct window_pane *wp, struct screen *s) { - u_int y; + struct tty_ctx ttyctx; + u_int y; memset(ctx, 0, sizeof *ctx); @@ -129,18 +130,26 @@ screen_write_start(struct screen_write_ctx *ctx, struct window_pane *wp, screen_size_y(ctx->s)); } } + + screen_write_initctx(ctx, &ttyctx); + tty_write(tty_cmd_syncstart, &ttyctx); } /* Finish writing. */ void screen_write_stop(struct screen_write_ctx *ctx) { + struct tty_ctx ttyctx; + screen_write_collect_end(ctx); screen_write_collect_flush(ctx, 0); log_debug("%s: %u cells (%u written, %u skipped)", __func__, ctx->cells, ctx->written, ctx->skipped); + screen_write_initctx(ctx, &ttyctx); + tty_write(tty_cmd_syncend, &ttyctx); + free(ctx->item); free(ctx->list); /* flush will have emptied */ } |