From 943490cfa17027fbee2b3d1d8cde7c219cc31e66 Mon Sep 17 00:00:00 2001 From: Michael Grant Date: Fri, 20 Mar 2026 07:49:49 +0000 Subject: [PATCH] Fix issue when a wp disappears in the middle of a drag event. --- server-client.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server-client.c b/server-client.c index ab67d49a..4c5b398c 100644 --- a/server-client.c +++ b/server-client.c @@ -4044,6 +4044,11 @@ server_client_remove_pane(struct window_pane *wp) RB_REMOVE(client_windows, &c->windows, cw); free(cw); } + if (c->tty.mouse_wp == wp) { + c->tty.mouse_wp = NULL; + c->tty.mouse_drag_update = NULL; + c->tty.mouse_scrolling_flag = 0; + } } }