Commit c22f24f6 authored by Stefan Monnier's avatar Stefan Monnier

* lisp/xt-mouse.el (xterm-mouse--read-event-sequence-1000):

Always store button numbers in the same way in xterm-mouse-last;
Don't burp is xterm-mouse-last is not set as expected.
Never return negative indices.

Fixes: debbugs:17378
parent 4dd3c4d5
2014-05-05 Stefan Monnier <monnier@iro.umontreal.ca>
* xt-mouse.el (xterm-mouse--read-event-sequence-1000): (bug#17378)
Always store button numbers in the same way in xterm-mouse-last;
Don't burp is xterm-mouse-last is not set as expected.
Never return negative indices.
2014-05-05 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-syntax-propertize-function):
......
......@@ -161,10 +161,10 @@ http://invisible-island.net/xterm/ctlseqs/ctlseqs.html)."
(cond ((>= code 64)
(format "mouse-%d" (- code 60)))
((memq code '(8 9 10))
(setq xterm-mouse-last code)
(setq xterm-mouse-last (- code 8))
(format "M-down-mouse-%d" (- code 7)))
((= code 11)
(format "M-mouse-%d" (- xterm-mouse-last 7)))
(format "M-mouse-%d" (+ 1 (or xterm-mouse-last 0))))
((= code 3)
;; For buttons > 5 xterm only reports a
;; button-release event. Avoid error by mapping
......@@ -174,8 +174,8 @@ http://invisible-island.net/xterm/ctlseqs/ctlseqs.html)."
(setq xterm-mouse-last code)
(format "down-mouse-%d" (+ 1 code))))))
;; x and y coordinates
(- (read-event) 33)
(- (read-event) 33)))
(max 0 (- (read-event) 33))
(max 0 (- (read-event) 33))))
;; XTerm's 1006-mode terminal mouse click reporting has the form
;; <BUTTON> ; <X> ; <Y> <M or m>, where the button and ordinates are
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment