summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2024-11-16 16:49:51 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2024-11-16 16:49:51 +0000
commitbd4d99e571bb49b044843b17f572ed9dbbe755b6 (patch)
tree04f756f5065df6eba0f8b45e41c4b3165dbd4f17
parentcae5e4d27d0174ef5af5bf2f777aa236eeca9335 (diff)
Do not call layout_fix_panes if wp is NULL (that is, a popup).
-rw-r--r--usr.bin/tmux/screen-write.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c
index dce13a6c626..24f0a8a3284 100644
--- a/usr.bin/tmux/screen-write.c
+++ b/usr.bin/tmux/screen-write.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: screen-write.c,v 1.231 2024/11/15 09:01:16 nicm Exp $ */
+/* $OpenBSD: screen-write.c,v 1.232 2024/11/16 16:49:50 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -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)