all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Asher Langton <langton@gmail.com>
To: 6594@debbugs.gnu.org
Subject: bug#6594: 23.2; xterm-mouse-mode bug
Date: Tue, 26 Jul 2011 11:53:34 -0700	[thread overview]
Message-ID: <CAB079HJvzJPaGWYqqqKHbm4QDe_8Rsdd7fE6tygakTTpoU_4GA@mail.gmail.com> (raw)
In-Reply-To: <4C3757C8.7040009@oracle.com>

[Apologies if this is a duplicate; I tried both 6594@debbugs.gnu.org
and the bug-gnu-emacs list yesterday, but neither seems to have
worked.]

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





  parent reply	other threads:[~2011-07-26 18:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-09 17:09 bug#6594: 23.2; xterm-mouse-mode bug Ilya Tatar
2010-07-14 17:57 ` Jan Djärv
2011-04-24  1:59 ` bug#6594: (no subject) Ilya Tatar
2011-04-25 12:06   ` Jan Djärv
2011-07-25 20:00 ` bug#6594: xterm-mouse-mode bug still appears in 23.3.1 Langton, Asher
2011-07-25 21:44 ` bug#6594: <no subject> Langton, Asher
2011-07-27 20:30   ` Andreas Schwab
2011-07-27 22:18     ` Langton, Asher
2011-07-28  6:58       ` Andreas Schwab
2011-07-28 16:51         ` Langton, Asher
2011-07-25 22:23 ` Langton, Asher
2011-07-26  3:46 ` bug#6594: 23.2; xterm-mouse-mode bug Langton, Asher
2011-07-26 18:53 ` Asher Langton [this message]
2011-07-28 19:00 ` Andreas Schwab
2011-07-28 19:01 ` bug#6594: Auto Reply: bug#6594: closed (Re: bug#6594: 23.2; xterm-mouse-mode bug) ilya.tatar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAB079HJvzJPaGWYqqqKHbm4QDe_8Rsdd7fE6tygakTTpoU_4GA@mail.gmail.com \
    --to=langton@gmail.com \
    --cc=6594@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.