summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2006-12-02 21:47:02 +0000
committerChong Yidong <cyd@stupidchicken.com>2006-12-02 21:47:02 +0000
commita9d0154753823698c01d9f628bc66951e31dfecf (patch)
tree693fba68b74cdc9c064b2b7a93eac880ec1c36a2 /lisp/mouse.el
parent8a6137df3a5c5d017dd239ce7fe8bc48292bc6a3 (diff)
downloademacs-a9d0154753823698c01d9f628bc66951e31dfecf.tar.gz
(mouse-drag-track): Suppress automatic hscrolling for initial down
event.
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 23a2cab4740..b60552f1183 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -925,7 +925,11 @@ should only be used by mouse-drag-region."
(click-count (1- (event-click-count start-event)))
(remap-double-click (and on-link
(eq mouse-1-click-follows-link 'double)
- (= click-count 1))))
+ (= click-count 1)))
+ ;; Suppress automatic hscrolling, because that is a nuisance
+ ;; when setting point near the right fringe (but see below).
+ (automatic-hscrolling-saved automatic-hscrolling)
+ (automatic-hscrolling nil))
(setq mouse-selection-click-count click-count)
;; In case the down click is in the middle of some intangible text,
;; use the end of that text, and put it in START-POINT.
@@ -946,6 +950,11 @@ should only be used by mouse-drag-region."
(memq (car-safe event) '(switch-frame select-window))))
(if (memq (car-safe event) '(switch-frame select-window))
nil
+ ;; Automatic hscrolling did not occur during the call to
+ ;; `read-event'; but if the user subsequently drags the
+ ;; mouse, go ahead and hscroll.
+ (let ((automatic-hscrolling automatic-hscrolling-saved))
+ (redisplay))
(setq end (event-end event)
end-point (posn-point end))
(if (numberp end-point)