mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Initialize context before testing it.
This commit is contained in:
		@@ -1505,11 +1505,10 @@ 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);
 | 
			
		||||
	if (ttyctx.redraw_cb != NULL)
 | 
			
		||||
		ttyctx.redraw_cb(&ttyctx);
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Trim collected items. */
 | 
			
		||||
static struct screen_write_citem *
 | 
			
		||||
@@ -2129,11 +2128,10 @@ 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);
 | 
			
		||||
	if (ttyctx.redraw_cb != NULL)
 | 
			
		||||
		ttyctx.redraw_cb(&ttyctx);
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Turn alternate screen off. */
 | 
			
		||||
void
 | 
			
		||||
@@ -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);
 | 
			
		||||
	if (ttyctx.redraw_cb != NULL)
 | 
			
		||||
		ttyctx.redraw_cb(&ttyctx);
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user