summaryrefslogtreecommitdiff
path: root/lisp/follow.el
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2018-10-15 19:48:25 +0000
committerAlan Mackenzie <acm@muc.de>2018-10-15 19:48:25 +0000
commit1439d89f4dd3c156ddd4f6877075ffe76456c21a (patch)
tree53a7fb0b5ac0daa81389659267e4da9a5771d790 /lisp/follow.el
parent3d91dc1bb5aeecda786ebe1805c33d14c8bd89fa (diff)
downloademacs-1439d89f4dd3c156ddd4f6877075ffe76456c21a.tar.gz
In follow mode, prevent the cursor resting on a partially displayed line
This fixes bug #32848 * lisp/follow.el (follow-adjust-window): If point ends up in a partially displayed line in a left hand or middle window, move it one line forward, to prevent unwanted scrolling should make-cursor-line-fully-visible be non-nil.
Diffstat (limited to 'lisp/follow.el')
-rw-r--r--lisp/follow.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/follow.el b/lisp/follow.el
index e2d3a11b654..b44df423d60 100644
--- a/lisp/follow.el
+++ b/lisp/follow.el
@@ -1405,7 +1405,13 @@ non-first windows in Follow mode."
(unless (eq win (selected-window))
(let ((p (window-point win)))
(set-window-start win (window-start win) nil)
- (set-window-point win p))))
+ (if (nth 2 (pos-visible-in-window-p p win t))
+ ;; p is in a partially visible line. We can't leave
+ ;; window-point there, because C-x o back into WIN
+ ;; would then fail.
+ (with-selected-window win
+ (forward-line)) ; redisplay will recenter it in WIN.
+ (set-window-point win p)))))
(unless visible
;; If point may not be visible in the selected window,