diff options
| author | Andreas Schwab <schwab@suse.de> | 2008-03-24 09:28:05 +0000 |
|---|---|---|
| committer | Andreas Schwab <schwab@suse.de> | 2008-03-24 09:28:05 +0000 |
| commit | 480c7003c9a2ed2d6e179915415fe87bc90cb30a (patch) | |
| tree | 0704e4545863bbf9936fa9837b0686981828a7c9 | |
| parent | 4bb3252c4612435f664bd21ac285b80594355bb4 (diff) | |
| download | emacs-480c7003c9a2ed2d6e179915415fe87bc90cb30a.tar.gz | |
(xterm-mouse-event): Avoid error with buttons > 5.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/xt-mouse.el | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0eb344b408a..ffe9ee17e80 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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): 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)))))) |
