summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-09-23 17:44:50 +0000
committerRichard M. Stallman <rms@gnu.org>1996-09-23 17:44:50 +0000
commitf5439cf91501dea53bccbf8961593fef51ab9701 (patch)
treeb241284d48a761632d6cc5d26de83f41ef4bb528
parentaa972d41eccb1c1109e6c22c0933484547312363 (diff)
downloademacs-f5439cf91501dea53bccbf8961593fef51ab9701.tar.gz
(mouse-drag-region): Ignore event end-point if it is not a number.
-rw-r--r--lisp/mouse.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 8da7095bada..ef41a38caad 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -524,7 +524,7 @@ remains active. Otherwise, it remains until the next input event."
nil
(setq end (event-end event)
end-point (posn-point end))
- (if end-point
+ (if (numberp end-point)
(setq last-end-point end-point))
(cond
@@ -574,7 +574,10 @@ remains active. Otherwise, it remains until the next input event."
(cons event unread-command-events)))
(if (not (= (overlay-start mouse-drag-overlay)
(overlay-end mouse-drag-overlay)))
- (let* ((stop-point (or (posn-point (event-end event)) last-end-point))
+ (let* ((stop-point
+ (if (numberp (posn-point (event-end event)))
+ (posn-point (event-end event))
+ last-end-point))
;; The end that comes from where we ended the drag.
;; Point goes here.
(region-termination