]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix precision scrolling down for multi-line display strings
authorPo Lu <luangruo@yahoo.com>
Thu, 23 Dec 2021 13:26:59 +0000 (21:26 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 23 Dec 2021 13:26:59 +0000 (21:26 +0800)
* lisp/pixel-scroll.el
(pixel-scroll-precision-scroll-down-page): Make sure Y delta
is appropriate before deciding on next-pos.

lisp/pixel-scroll.el

index 223bc7fbc4739d7eba61d357960a007514e0670a..975c5133f11ab213d78d73c4d04d4c956ef26da4 100644 (file)
@@ -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))