From: Richard M. Stallman Date: Fri, 27 Oct 1995 17:48:32 +0000 (+0000) Subject: (mouse-drag-region): Set end-of-range after calling mouse-scroll-subr. X-Git-Tag: emacs-19.34~2553 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f9278a75c4241bfc9d9b7565a9dd06c1b64b118f;p=emacs.git (mouse-drag-region): Set end-of-range after calling mouse-scroll-subr. (mouse-set-region): Don't do the sit-for on a pc frame. --- diff --git a/lisp/mouse.el b/lisp/mouse.el index 351d307361f..3531329cdd7 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -401,6 +401,7 @@ This should be bound to a mouse drag event." ;; On X, we highlight while dragging, thus once again no need to bounce. (or transient-mark-mode (eq (framep (selected-frame)) 'x) + (eq (framep (selected-frame)) 'pc) (sit-for 1)) (push-mark) (set-mark (point)) @@ -543,10 +544,14 @@ release the mouse button. Otherwise, it does not." ((null mouse-row)) ((< mouse-row top) (mouse-scroll-subr start-window (- mouse-row top) - mouse-drag-overlay start-point)) + mouse-drag-overlay start-point) + ;; Without this, point tends to jump back to the starting + ;; position where the mouse button was pressed down. + (setq end-of-range (overlay-start mouse-drag-overlay))) ((>= mouse-row bottom) (mouse-scroll-subr start-window (1+ (- mouse-row bottom)) - mouse-drag-overlay start-point))))))))) + mouse-drag-overlay start-point) + (setq end-of-range (overlay-end mouse-drag-overlay)))))))))) (if (consp event) (let ((fun (key-binding (vector (car event))))) ;; Run the binding of the terminating up-event, if possible.