]> git.eshelyaron.com Git - emacs.git/commitdiff
(mouse-drag-region): Ignore event end-point if it is not a number.
authorRichard M. Stallman <rms@gnu.org>
Mon, 23 Sep 1996 17:44:50 +0000 (17:44 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 23 Sep 1996 17:44:50 +0000 (17:44 +0000)
lisp/mouse.el

index 8da7095bada2903372f241785fdb7f0ddcbfb6c5..ef41a38caaddee6098bcb38092aa969a647d3654 100644 (file)
@@ -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