changeset 16304:ba59fb4dd237

(mouse-drag-region): Ignore event end-point if it is not a number.
author Richard M. Stallman <rms@gnu.org>
date Mon, 23 Sep 1996 17:44:50 +0000
parents b65af4967b38
children 00e57c8adaba
files lisp/mouse.el
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mouse.el	Mon Sep 23 06:57:54 1996 +0000
+++ b/lisp/mouse.el	Mon Sep 23 17:44:50 1996 +0000
@@ -524,7 +524,7 @@
 	      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 @@
 			(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