Commit 29bbcfa7 authored by Andreas Schwab's avatar Andreas Schwab

Fixes: debbugs:6594

* lisp/xt-mouse.el (xterm-mouse-event-read): Try to recover the raw
character.
parent c897048c
2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
* xt-mouse.el (xterm-mouse-event-read): Try to recover the raw
character. (Bug#6594)
2011-07-12 Chong Yidong <cyd@stupidchicken.com>
* window.el (split-window-horizontally): Doc fix (Bug#9060).
......
......@@ -121,10 +121,17 @@
;; read xterm sequences above ascii 127 (#x7f)
(defun xterm-mouse-event-read ()
;; We get the characters decoded by the keyboard coding system. Try
;; to recover the raw character.
(let ((c (read-char)))
(if (> c #x3FFF80)
(+ 128 (- c #x3FFF80))
c)))
(cond ;; If meta-flag is t we get a meta character
((>= c ?\M-\^@)
(- c (- ?\M-\^@ 128)))
;; Reencode the character in the keyboard coding system, if
;; this is a non-ASCII character.
((>= c #x80)
(aref (encode-coding-string (string c) (keyboard-coding-system)) 0))
(t c))))
(defun xterm-mouse-truncate-wrap (f)
"Truncate with wrap-around."
......
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