From: Po Lu Date: Thu, 23 Dec 2021 13:26:59 +0000 (+0800) Subject: Fix precision scrolling down for multi-line display strings X-Git-Tag: emacs-29.0.90~3487 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=03dc54ba7fbd83e93b6841acbed14ae8ce319b7c;p=emacs.git Fix precision scrolling down for multi-line display strings * lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down-page): Make sure Y delta is appropriate before deciding on next-pos. --- diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el index 223bc7fbc47..975c5133f11 100644 --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el @@ -461,6 +461,11 @@ the height of the current window." (when (zerop (vertical-motion (1+ scroll-margin))) (set-window-start nil desired-start) (signal 'end-of-buffer nil)) + (while (when-let ((posn (posn-at-point))) + (< (cdr (posn-x-y posn)) delta)) + (when (zerop (vertical-motion 1)) + (set-window-start nil desired-start) + (signal 'end-of-buffer nil))) (point))) (scroll-preserve-screen-position nil) (auto-window-vscroll nil))