From: Po Lu Date: Tue, 30 Nov 2021 12:49:59 +0000 (+0800) Subject: Fix pixel scrolling again X-Git-Tag: emacs-29.0.90~3635^2~13 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=55151f94ea333479f61259890dad46bcf18ede3e;p=emacs.git Fix pixel scrolling again * lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down): Fix confusion about absolutivity of `window-edges'. --- diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el index cc90be021f7..5ffa8caa71c 100644 --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el @@ -424,10 +424,11 @@ the height of the current window." (defun pixel-scroll-precision-scroll-up (delta) "Scroll the current window up by DELTA pixels." (let* ((edges (window-edges nil t nil t)) - (max-y (- (nth 3 edges) 1 + (max-y (- (nth 3 edges) + (nth 1 edges) (window-tab-line-height) (window-header-line-height))) - (usable-height (- max-y (nth 1 edges)))) + (usable-height max-y)) (when-let* ((posn (posn-at-point)) (current-y (+ (cdr (posn-x-y posn)) (line-pixel-height))))