summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index b7c77c2746b..924bc71d837 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -47,8 +47,10 @@
(if (consp relative-coordinate)
(progn
(move-to-window-line (car (cdr relative-coordinate)))
+ ;; Note that hscroll must get above 1
+ ;; before the text actually starts to move.
(move-to-column (+ (car relative-coordinate) (current-column)
- (window-hscroll (selected-window))))
+ (1- (max 1 (window-hscroll (selected-window))))))
(what-line)))))
(defun mouse-eval-last-sexpr (event)