summaryrefslogtreecommitdiff
path: root/lisp/xt-mouse.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/xt-mouse.el')
-rw-r--r--lisp/xt-mouse.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el
index a2b64019f97..d2d0cf5ee06 100644
--- a/lisp/xt-mouse.el
+++ b/lisp/xt-mouse.el
@@ -1,4 +1,4 @@
-;;; xt-mouse.el --- support the mouse when emacs run in an xterm
+;;; xt-mouse.el --- support the mouse when emacs run in an xterm -*- lexical-binding: t -*-
;; Copyright (C) 1994, 2000-2016 Free Software Foundation, Inc.
@@ -70,7 +70,11 @@ http://invisible-island.net/xterm/ctlseqs/ctlseqs.html)."
(cond
((null event) nil) ;Unknown/bogus byte sequence!
(is-down
- (setf (terminal-parameter nil 'xterm-mouse-last-down) event)
+ (setf (terminal-parameter nil 'xterm-mouse-last-down)
+ ;; EVENT might be handed back to the input queue, which
+ ;; might modify it. Copy it into the terminal parameter
+ ;; to guard against that.
+ (copy-sequence event))
vec)
(is-move vec)
(t