[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6594: 23.2; xterm-mouse-mode bug
From: |
Langton, Asher |
Subject: |
bug#6594: 23.2; xterm-mouse-mode bug |
Date: |
Mon, 25 Jul 2011 20:46:49 -0700 |
User-agent: |
Microsoft-MacOutlook/14.12.0.110505 |
[Apologies if this is a duplicate; my previous two replies to this bug
report never showed up.]
I put a print statement in xterm-mouse-event that displayed the values of
type, x, and y. For some arbitrary clicks, here was the output (all in
pairs; mouse-1 and down-mouse-1, I assume):
In xterm-mouse-event with 0,130023656,46
In xterm-mouse-event with 3,130023656,46
In xterm-mouse-event with 0,37,35
In xterm-mouse-event with 3,37,35
In xterm-mouse-event with 0,12,33
In xterm-mouse-event with 3,12,33
In xterm-mouse-event with 0,130023730,17
In xterm-mouse-event with 3,130023730,17
It appears that the value of x jumps to 0x8000000 around the 94th column.
I don't know much about the internals of emacs nor what the valid
character values are here, but this fix works for me on both Linux and OSX:
--- xt-mouse.el 2011-07-25 20:41:03.000000000 -0700
+++ xt-mouse_modified.el 2011-07-25 20:40:39.000000000 -0700
@@ -122,9 +122,11 @@
;; read xterm sequences above ascii 127 (#x7f)
(defun xterm-mouse-event-read ()
(let ((c (read-char)))
- (if (> c #x3FFF80)
- (+ 128 (- c #x3FFF80))
- c)))
+ (cond ((and (> c #x3FFF80) (< c #x3FFFFF))
+ (+ 128 (- c #x3FFF80)))
+ ((>= c #x8000000)
+ (+ 128 (- c #x8000000)))
+ (t c))))
-Asher
- bug#6594: 23.2; xterm-mouse-mode bug,
Langton, Asher <=