Make last change work for deltas that are multiples of max-height
* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down-page) (pixel-scroll-precision-scroll-up-page): Use `max-height' that is slightly less than the text height of the window.
This commit is contained in:
parent
1450fa16ed
commit
be1359884f
1 changed files with 4 additions and 2 deletions
|
@ -439,7 +439,8 @@ the height of the current window."
|
|||
|
||||
(defun pixel-scroll-precision-scroll-down (delta)
|
||||
"Scroll the current window down by DELTA pixels."
|
||||
(let ((max-height (window-text-height nil t)))
|
||||
(let ((max-height (- (window-text-height nil t)
|
||||
(frame-char-height))))
|
||||
(while (> delta max-height)
|
||||
(pixel-scroll-precision-scroll-down-page max-height)
|
||||
(setq delta (- delta max-height)))
|
||||
|
@ -499,7 +500,8 @@ the height of the current window."
|
|||
|
||||
(defun pixel-scroll-precision-scroll-up (delta)
|
||||
"Scroll the current window up by DELTA pixels."
|
||||
(let ((max-height (window-text-height nil t)))
|
||||
(let ((max-height (- (window-text-height nil t)
|
||||
(frame-char-height))))
|
||||
(while (> delta max-height)
|
||||
(pixel-scroll-precision-scroll-up-page max-height)
|
||||
(setq delta (- delta max-height)))
|
||||
|
|
Loading…
Add table
Reference in a new issue