aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2021-11-30 20:49:59 +0800
committerPo Lu2021-11-30 20:49:59 +0800
commit55151f94ea333479f61259890dad46bcf18ede3e (patch)
tree25cfb18eb700982c3387b13c53577838287e435d
parent6c17cdc1dc04697398811d96e40a9a3ad07bbd3f (diff)
downloademacs-55151f94ea333479f61259890dad46bcf18ede3e.tar.gz
emacs-55151f94ea333479f61259890dad46bcf18ede3e.zip
Fix pixel scrolling again
* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down): Fix confusion about absolutivity of `window-edges'.
-rw-r--r--lisp/pixel-scroll.el5
1 files changed, 3 insertions, 2 deletions
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."
424(defun pixel-scroll-precision-scroll-up (delta) 424(defun pixel-scroll-precision-scroll-up (delta)
425 "Scroll the current window up by DELTA pixels." 425 "Scroll the current window up by DELTA pixels."
426 (let* ((edges (window-edges nil t nil t)) 426 (let* ((edges (window-edges nil t nil t))
427 (max-y (- (nth 3 edges) 1 427 (max-y (- (nth 3 edges)
428 (nth 1 edges)
428 (window-tab-line-height) 429 (window-tab-line-height)
429 (window-header-line-height))) 430 (window-header-line-height)))
430 (usable-height (- max-y (nth 1 edges)))) 431 (usable-height max-y))
431 (when-let* ((posn (posn-at-point)) 432 (when-let* ((posn (posn-at-point))
432 (current-y (+ (cdr (posn-x-y posn)) 433 (current-y (+ (cdr (posn-x-y posn))
433 (line-pixel-height)))) 434 (line-pixel-height))))