aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman1996-09-23 17:44:50 +0000
committerRichard M. Stallman1996-09-23 17:44:50 +0000
commit3617aa76fcfd1ac96e6888867ab438587df1753f (patch)
tree35d5222c9a2b8462ec29dbfb54345c53474c1413 /lisp
parent57498544b7bbce85f353b03c3cc2ba8af87130a9 (diff)
downloademacs-3617aa76fcfd1ac96e6888867ab438587df1753f.tar.gz
emacs-3617aa76fcfd1ac96e6888867ab438587df1753f.zip
(mouse-drag-region): Ignore event end-point if it is not a number.
Diffstat (limited to 'lisp')
-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."
524 nil 524 nil
525 (setq end (event-end event) 525 (setq end (event-end event)
526 end-point (posn-point end)) 526 end-point (posn-point end))
527 (if end-point 527 (if (numberp end-point)
528 (setq last-end-point end-point)) 528 (setq last-end-point end-point))
529 529
530 (cond 530 (cond
@@ -574,7 +574,10 @@ remains active. Otherwise, it remains until the next input event."
574 (cons event unread-command-events))) 574 (cons event unread-command-events)))
575 (if (not (= (overlay-start mouse-drag-overlay) 575 (if (not (= (overlay-start mouse-drag-overlay)
576 (overlay-end mouse-drag-overlay))) 576 (overlay-end mouse-drag-overlay)))
577 (let* ((stop-point (or (posn-point (event-end event)) last-end-point)) 577 (let* ((stop-point
578 (if (numberp (posn-point (event-end event)))
579 (posn-point (event-end event))
580 last-end-point))
578 ;; The end that comes from where we ended the drag. 581 ;; The end that comes from where we ended the drag.
579 ;; Point goes here. 582 ;; Point goes here.
580 (region-termination 583 (region-termination