]> code.delx.au - gnu-emacs/blobdiff - lisp/xt-mouse.el
Sync with Tramp 2.1.19.
[gnu-emacs] / lisp / xt-mouse.el
index 86c28fa4734decf1e4f3651154296bf04859d1f7..f802103fbd7a872db95e4d3d1c07636c47310913 100644 (file)
@@ -1,7 +1,7 @@
 ;;; xt-mouse.el --- support the mouse when emacs run in an xterm
 
 ;; Copyright (C) 1994, 2000, 2001, 2002, 2003,
-;;   2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;;   2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: mouse, terminals
 ;; read xterm sequences above ascii 127 (#x7f)
 (defun xterm-mouse-event-read ()
   (let ((c (read-char)))
-    (if (< c 0)
-        (+ c #x8000000 128)
+    (if (> c #x3FFF80)
+        (+ 128 (- c #x3FFF80))
       c)))
 
 (defun xterm-mouse-truncate-wrap (f)