mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-18 18:05:07 +00:00
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.
This commit is contained in:
parent
3d91dc1bb5
commit
1439d89f4d
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user