aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schwab2008-03-24 09:28:05 +0000
committerAndreas Schwab2008-03-24 09:28:05 +0000
commit318f2a46e093827563af5e297178bb8fb098a3b8 (patch)
treee472ac3c4e168f99f16e1ee71a3105387e8a876e
parent49546869f3c91ca106826bce94d411aff3d5b065 (diff)
downloademacs-318f2a46e093827563af5e297178bb8fb098a3b8.tar.gz
emacs-318f2a46e093827563af5e297178bb8fb098a3b8.zip
(xterm-mouse-event): Avoid error with buttons > 5.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/xt-mouse.el5
2 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 013080db8cc..8b4038e1b23 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12008-03-24 Andreas Schwab <schwab@suse.de>
2
3 * xt-mouse.el (xterm-mouse-event): Avoid error with buttons > 5.
4
12008-03-24 Dan Nicolaescu <dann@ics.uci.edu> 52008-03-24 Dan Nicolaescu <dann@ics.uci.edu>
2 6
3 * vc-hg.el (vc-hg-after-dir-status): 7 * vc-hg.el (vc-hg-after-dir-status):
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el
index 5109596527b..5f8d8ca61db 100644
--- a/lisp/xt-mouse.el
+++ b/lisp/xt-mouse.el
@@ -168,7 +168,10 @@
168 ((= type 11) 168 ((= type 11)
169 (format "mouse-%d" (- xterm-mouse-last 7))) 169 (format "mouse-%d" (- xterm-mouse-last 7)))
170 ((= type 3) 170 ((= type 3)
171 (format "mouse-%d" (+ 1 xterm-mouse-last))) 171 ;; For buttons > 5 xterm only reports a
172 ;; button-release event. Avoid error by mapping
173 ;; them all to mouse-1.
174 (format "mouse-%d" (+ 1 (or xterm-mouse-last 0))))
172 (t 175 (t
173 (setq xterm-mouse-last type) 176 (setq xterm-mouse-last type)
174 (format "down-mouse-%d" (+ 1 type)))))) 177 (format "down-mouse-%d" (+ 1 type))))))