Fix pixel scrolling over lines with different sized glyphs

* lisp/pixel-scroll.el
(pixel-scroll-precision-scroll-down-page): Calculate desired
vscroll with `window-text-pixel-size'.
This commit is contained in:
Po Lu 2021-12-09 17:40:08 +08:00
parent 52f3fe46a3
commit 07d95325e4

View file

@ -436,7 +436,10 @@ the height of the current window."
(window-header-line-height))))
(object (posn-object desired-pos))
(desired-start (posn-point desired-pos))
(desired-vscroll (cdr (posn-object-x-y desired-pos)))
(scroll-area-total-height (cdr (window-text-pixel-size nil
(window-start)
(1- desired-start))))
(desired-vscroll (- delta scroll-area-total-height))
(edges (window-edges nil t))
(usable-height (- (nth 3 edges)
(nth 1 edges)))