emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 55151f9: Fix pixel scrolling again


From: Po Lu
Subject: master 55151f9: Fix pixel scrolling again
Date: Tue, 30 Nov 2021 07:51:10 -0500 (EST)

branch: master
commit 55151f94ea333479f61259890dad46bcf18ede3e
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix pixel scrolling again
    
    * lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down): Fix
    confusion about absolutivity of `window-edges'.
---
 lisp/pixel-scroll.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el
index cc90be0..5ffa8ca 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))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]