diff options
author | Thomas Adam <thomas@xteddy.org> | 2022-10-25 22:01:10 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2022-10-25 22:01:10 +0100 |
commit | d001a94d7b5a80018871360fa91361f9268d66c3 (patch) | |
tree | e3b6ccd7a16a9f043c42099b1fe13c68d97c37b4 | |
parent | dafd6f462fa3b90c97d0e6ecd887c62cbc2a54c3 (diff) | |
parent | c2580cfe2466589c8bd9348225820888a3fc4c0a (diff) | |
download | rtmux-d001a94d7b5a80018871360fa91361f9268d66c3.tar.gz rtmux-d001a94d7b5a80018871360fa91361f9268d66c3.tar.bz2 rtmux-d001a94d7b5a80018871360fa91361f9268d66c3.zip |
Merge branch 'obsd-master'
-rw-r--r-- | screen-write.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/screen-write.c b/screen-write.c index a2107f2a..24195708 100644 --- a/screen-write.c +++ b/screen-write.c @@ -1505,10 +1505,9 @@ screen_write_fullredraw(struct screen_write_ctx *ctx) screen_write_collect_flush(ctx, 0, __func__); - if (ttyctx.redraw_cb != NULL) { - screen_write_initctx(ctx, &ttyctx, 1); + screen_write_initctx(ctx, &ttyctx, 1); + if (ttyctx.redraw_cb != NULL) ttyctx.redraw_cb(&ttyctx); - } } /* Trim collected items. */ @@ -2129,10 +2128,9 @@ screen_write_alternateon(struct screen_write_ctx *ctx, struct grid_cell *gc, screen_write_collect_flush(ctx, 0, __func__); screen_alternate_on(ctx->s, gc, cursor); - if (ttyctx.redraw_cb != NULL) { - screen_write_initctx(ctx, &ttyctx, 1); + screen_write_initctx(ctx, &ttyctx, 1); + if (ttyctx.redraw_cb != NULL) ttyctx.redraw_cb(&ttyctx); - } } /* Turn alternate screen off. */ @@ -2149,8 +2147,7 @@ screen_write_alternateoff(struct screen_write_ctx *ctx, struct grid_cell *gc, screen_write_collect_flush(ctx, 0, __func__); screen_alternate_off(ctx->s, gc, cursor); - if (ttyctx.redraw_cb != NULL) { - screen_write_initctx(ctx, &ttyctx, 1); + screen_write_initctx(ctx, &ttyctx, 1); + if (ttyctx.redraw_cb != NULL) ttyctx.redraw_cb(&ttyctx); - } } |