Commit 3617aa76 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(mouse-drag-region): Ignore event end-point if it is not a number.

parent 57498544
......@@ -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
......
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