=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/screen-write.c,v retrieving revision 1.161 retrieving revision 1.162 diff -c -r1.161 -r1.162 *** src/usr.bin/tmux/screen-write.c 2020/04/15 16:11:23 1.161 --- src/usr.bin/tmux/screen-write.c 2020/04/16 13:35:24 1.162 *************** *** 1,4 **** ! /* $OpenBSD: screen-write.c,v 1.161 2020/04/15 16:11:23 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: screen-write.c,v 1.162 2020/04/16 13:35:24 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 100,106 **** screen_write_start(struct screen_write_ctx *ctx, struct window_pane *wp, struct screen *s) { ! u_int y; memset(ctx, 0, sizeof *ctx); --- 100,107 ---- screen_write_start(struct screen_write_ctx *ctx, struct window_pane *wp, struct screen *s) { ! struct tty_ctx ttyctx; ! u_int y; memset(ctx, 0, sizeof *ctx); *************** *** 129,145 **** --- 130,154 ---- 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 */