summaryrefslogtreecommitdiff
path: root/lisp/xt-mouse.el
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2008-03-24 09:28:05 +0000
committerAndreas Schwab <schwab@suse.de>2008-03-24 09:28:05 +0000
commit318f2a46e093827563af5e297178bb8fb098a3b8 (patch)
treee472ac3c4e168f99f16e1ee71a3105387e8a876e /lisp/xt-mouse.el
parent49546869f3c91ca106826bce94d411aff3d5b065 (diff)
downloademacs-318f2a46e093827563af5e297178bb8fb098a3b8.tar.gz
(xterm-mouse-event): Avoid error with buttons > 5.
Diffstat (limited to 'lisp/xt-mouse.el')
-rw-r--r--lisp/xt-mouse.el5
1 files changed, 4 insertions, 1 deletions
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 @@
((= 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))))))