From: Po Lu Date: Sat, 25 Jun 2022 12:07:35 +0000 (+0800) Subject: Update input_pending after deferring selection requests X-Git-Tag: emacs-29.0.90~1447^2~1469 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bdf495f25fe38a151b96c4061fc0dffc121fcc14;p=emacs.git 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. --- 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;