From 973c4ab56929eeaf83e3270c48fcaba513d9a8a0 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 26 Jun 2026 13:58:00 +0000 Subject: [PATCH] Drop mouse movement events rather than redrawing unnecessarily. --- window.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/window.c b/window.c index 9d3106a22..ac71a72bd 100644 --- a/window.c +++ b/window.c @@ -1601,6 +1601,12 @@ window_pane_key(struct window_pane *wp, struct client *c, struct session *s, wme = TAILQ_FIRST(&wp->modes); if (wme != NULL) { + /* + * No mode uses mouse motion events, so drop them here rather + * than passing them on and causing a redraw on every movement. + */ + if (KEYC_IS_TYPE(key, KEYC_TYPE_MOUSEMOVE)) + return (0); if (wme->mode->key != NULL && c != NULL) { key &= ~KEYC_MASK_FLAGS; wme->mode->key(wme, c, s, wl, key, m);