;;;###autoload
(defun pixel-scroll-precision-scroll-down-page (delta)
"Scroll the current window down by DELTA pixels.
-Note that this function doesn't work if DELTA is larger than
-the height of the current window."
+Note that this function doesn't work if DELTA is larger than or
+equal to the height of the current window."
(let* ((desired-pos (posn-at-x-y 0 (+ delta
(window-tab-line-height)
(window-header-line-height))))
(defun pixel-scroll-precision-scroll-down (delta)
"Scroll the current window down by DELTA pixels."
- (let ((max-height (- (window-text-height nil t)
- (frame-char-height))))
+ (let ((max-height (1- (window-text-height nil t))))
(while (> delta max-height)
(pixel-scroll-precision-scroll-down-page max-height)
(setq delta (- delta max-height)))
(defun pixel-scroll-precision-scroll-up (delta)
"Scroll the current window up by DELTA pixels."
- (let ((max-height (- (window-text-height nil t)
- (frame-char-height))))
+ (let ((max-height (window-text-height nil t)))
(when (> max-height 0)
(while (> delta max-height)
(pixel-scroll-precision-scroll-up-page max-height)