[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r117064: * lisp/xt-mouse.el (xterm-mouse--read-ev
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] emacs-24 r117064: * lisp/xt-mouse.el (xterm-mouse--read-event-sequence-1000): |
Date: |
Mon, 05 May 2014 23:50:25 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117064
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17378
committer: Stefan Monnier <address@hidden>
branch nick: emacs-24
timestamp: Mon 2014-05-05 19:50:20 -0400
message:
* 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.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/xt-mouse.el xtmouse.el-20091113204419-o5vbwnq5f7feedwu-905
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-05-05 23:18:18 +0000
+++ b/lisp/ChangeLog 2014-05-05 23:50:20 +0000
@@ -1,3 +1,10 @@
+2014-05-05 Stefan Monnier <address@hidden>
+
+ * 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 <address@hidden>
* progmodes/ruby-mode.el (ruby-syntax-propertize-function):
=== modified file 'lisp/xt-mouse.el'
--- a/lisp/xt-mouse.el 2014-01-01 07:43:34 +0000
+++ b/lisp/xt-mouse.el 2014-05-05 23:50:20 +0000
@@ -161,10 +161,10 @@
(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 @@
(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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r117064: * lisp/xt-mouse.el (xterm-mouse--read-event-sequence-1000):,
Stefan Monnier <=