From bdf495f25fe38a151b96c4061fc0dffc121fcc14 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sat, 25 Jun 2022 20:07:35 +0800 Subject: [PATCH] Update input_pending after deferring selection requests * src/xterm.c (x_defer_selection_requests): If kbd_fetch_ptr moved, update input_pending. Bug found calling `input-pending-p' inside the DND movement function. --- src/xterm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/xterm.c b/src/xterm.c index 7f43e21e884..7d5794bdd7a 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -842,7 +842,13 @@ x_defer_selection_requests (void) avoids exhausting the keyboard buffer with some over-enthusiastic clipboard managers. */ if (!between) - kbd_fetch_ptr = X_NEXT_KBD_EVENT (event); + { + kbd_fetch_ptr = X_NEXT_KBD_EVENT (event); + + /* `detect_input_pending' will then recompute + whether or not pending input events exist. */ + input_pending = false; + } } else between = true; -- 2.39.5