diff options
| author | Alan Mackenzie | 2018-10-03 15:57:15 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2018-10-03 15:57:15 +0000 |
| commit | 99f45ee42c5554d606407f6da37700e9bf86bd35 (patch) | |
| tree | 5f80a013a2649f9c0985c377f21f9de88df844fe | |
| parent | ea77c6594e5ccc9057ca664ef1dea766ca291b8e (diff) | |
| download | emacs-99f45ee42c5554d606407f6da37700e9bf86bd35.tar.gz emacs-99f45ee42c5554d606407f6da37700e9bf86bd35.zip | |
In follow mode, prevent the cursor resting on a partially displayed line
Don't merge to master. 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.
| -rw-r--r-- | lisp/follow.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/follow.el b/lisp/follow.el index fd397c077bb..eb48ec179cf 100644 --- a/lisp/follow.el +++ b/lisp/follow.el | |||
| @@ -1385,7 +1385,13 @@ non-first windows in Follow mode." | |||
| 1385 | (unless (eq win (selected-window)) | 1385 | (unless (eq win (selected-window)) |
| 1386 | (let ((p (window-point win))) | 1386 | (let ((p (window-point win))) |
| 1387 | (set-window-start win (window-start win) nil) | 1387 | (set-window-start win (window-start win) nil) |
| 1388 | (set-window-point win p)))) | 1388 | (if (nth 2 (pos-visible-in-window-p p win t)) |
| 1389 | ;; p is in a partially visible line. We can't leave | ||
| 1390 | ;; window-point there, because C-x o back into WIN | ||
| 1391 | ;; would then fail. | ||
| 1392 | (with-selected-window win | ||
| 1393 | (forward-line)) ; redisplay will recenter it in WIN. | ||
| 1394 | (set-window-point win p))))) | ||
| 1389 | 1395 | ||
| 1390 | (unless visible | 1396 | (unless visible |
| 1391 | ;; If point may not be visible in the selected window, | 1397 | ;; If point may not be visible in the selected window, |