From 7c01ab0cfbf470acc6bc92a2706c40429d9e7c47 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 23 Oct 2023 08:12:00 +0000 Subject: [PATCH] Unzoom window at start of destroy so it doesn't happen later (when destroying panes) after the layout has been freed, GitHub issue 3717. --- usr.bin/tmux/screen-write.c | 4 ++-- usr.bin/tmux/window.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c index 08d6438433d..45b36c8f3a1 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.222 2023/09/15 15:49:05 nicm Exp $ */ +/* $OpenBSD: screen-write.c,v 1.223 2023/10/23 08:12:00 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -2013,7 +2013,7 @@ screen_write_combine(struct screen_write_ctx *ctx, const struct grid_cell *gc) /* * Check if we need to combine characters. This could be zero width - * (zet above), a modifier character (with an existing Unicode + * (set above), a modifier character (with an existing Unicode * character) or a previous ZWJ. */ if (!zero_width) { diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c index f2e7d3d8e05..ef86f43b1c2 100644 --- a/usr.bin/tmux/window.c +++ b/usr.bin/tmux/window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window.c,v 1.286 2023/07/10 09:24:53 nicm Exp $ */ +/* $OpenBSD: window.c,v 1.287 2023/10/23 08:12:00 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -340,6 +340,7 @@ window_destroy(struct window *w) { log_debug("window @%u destroyed (%d references)", w->id, w->references); + window_unzoom(w); RB_REMOVE(windows, &windows, w); if (w->layout_root != NULL) -- 2.20.1