emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 6d9297a: Make xterm-mouse-event check whether the click event is


From: Lars Ingebrigtsen
Subject: master 6d9297a: Make xterm-mouse-event check whether the click event is valid
Date: Sun, 20 Sep 2020 17:32:55 -0400 (EDT)

branch: master
commit 6d9297abe0561e9a3750d4f07919b2973ec31504
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Make xterm-mouse-event check whether the click event is valid
    
    * lisp/xt-mouse.el (xterm-mouse-event): Defensively check against
    a situation that shouldn't happen (but does) (bug#17378).
---
 lisp/xt-mouse.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el
index 2b9fab5..362d29b 100644
--- a/lisp/xt-mouse.el
+++ b/lisp/xt-mouse.el
@@ -237,7 +237,10 @@ which is the \"1006\" extension implemented in Xterm >= 
277."
                      (xterm-mouse--read-event-sequence extension))
                     (t
                      (error "Unsupported XTerm mouse protocol")))))
-    (when click
+    (when (and click
+               ;; In very obscure circumstances, the click may become
+               ;; invalid (see bug#17378).
+               (>= (nth 1 click) 0))
       (let* ((type (nth 0 click))
              (x    (nth 1 click))
              (y    (nth 2 click))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]