From a854e36f2b5b8e7edcf683ac9dc6fe76f54c4582 Mon Sep 17 00:00:00 2001 From: nicm Date: Sat, 16 Nov 2024 16:49:50 +0000 Subject: [PATCH] Do not call layout_fix_panes if wp is NULL (that is, a popup). --- screen-write.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/screen-write.c b/screen-write.c index 3e5128dd..fe74dab3 100644 --- a/screen-write.c +++ b/screen-write.c @@ -2204,7 +2204,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); - layout_fix_panes(wp->window, NULL); + + if (wp != NULL) + layout_fix_panes(wp->window, NULL); screen_write_initctx(ctx, &ttyctx, 1); if (ttyctx.redraw_cb != NULL) @@ -2224,7 +2226,9 @@ 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); - layout_fix_panes(wp->window, NULL); + + if (wp != NULL) + layout_fix_panes(wp->window, NULL); screen_write_initctx(ctx, &ttyctx, 1); if (ttyctx.redraw_cb != NULL)