-/* $OpenBSD: screen-write.c,v 1.210 2022/10/25 09:04:49 nicm Exp $ */
+/* $OpenBSD: screen-write.c,v 1.211 2022/10/25 17:53:31 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
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. */
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. */
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);
- }
}