]> git.eshelyaron.com Git - emacs.git/commitdiff
(xterm-mouse-event): Avoid error with buttons > 5.
authorAndreas Schwab <schwab@suse.de>
Mon, 24 Mar 2008 09:28:05 +0000 (09:28 +0000)
committerAndreas Schwab <schwab@suse.de>
Mon, 24 Mar 2008 09:28:05 +0000 (09:28 +0000)
lisp/ChangeLog
lisp/xt-mouse.el

index 013080db8ccc29c6fad0d4c112fdc9d5a4c18ed8..8b4038e1b23948e896d35f333facee68838f0a1b 100644 (file)
@@ -1,3 +1,7 @@
+2008-03-24  Andreas Schwab  <schwab@suse.de>
+
+       * xt-mouse.el (xterm-mouse-event): Avoid error with buttons > 5.
+
 2008-03-24  Dan Nicolaescu  <dann@ics.uci.edu>
 
        * vc-hg.el (vc-hg-after-dir-status):
index 5109596527b0e83684cf685e984f0c7ae5072557..5f8d8ca61db626389cdbbc119d380ab909b0ec5d 100644 (file)
                       ((= type 11)
                        (format "mouse-%d" (- xterm-mouse-last 7)))
                       ((= type 3)
-                       (format "mouse-%d" (+ 1 xterm-mouse-last)))
+                       ;; For buttons > 5 xterm only reports a
+                       ;; button-release event.  Avoid error by mapping
+                       ;; them all to mouse-1.
+                       (format "mouse-%d" (+ 1 (or xterm-mouse-last 0))))
                       (t
                        (setq xterm-mouse-last type)
                        (format "down-mouse-%d" (+ 1 type))))))