[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a4ff841: Fix precision scrolling when there is a scroll margin
From: |
Po Lu |
Subject: |
master a4ff841: Fix precision scrolling when there is a scroll margin |
Date: |
Wed, 1 Dec 2021 20:57:32 -0500 (EST) |
branch: master
commit a4ff841154632da36ccb1bd01ea4e509465a692b
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Fix precision scrolling when there is a scroll margin
* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down)
(pixel-scroll-precision-scroll-up): Take scroll margin into
accout.
---
lisp/pixel-scroll.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el
index 9cd2352..2d6531a 100644
--- a/lisp/pixel-scroll.el
+++ b/lisp/pixel-scroll.el
@@ -383,7 +383,7 @@ the height of the current window."
(desired-vscroll (cdr (posn-object-x-y desired-pos)))
(next-pos (save-excursion
(goto-char desired-start)
- (when (zerop (vertical-motion 1))
+ (when (zerop (vertical-motion (1+ scroll-margin)))
(signal 'end-of-buffer nil))
(point))))
(if (and (< (point) next-pos)
@@ -419,7 +419,7 @@ the height of the current window."
(point (posn-point posn))
(up-point (save-excursion
(goto-char point)
- (vertical-motion -1)
+ (vertical-motion (- (1+ scroll-margin)))
(point))))
(when (> (point) up-point)
(when (let ((pos-visible (pos-visible-in-window-p up-point nil t)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master a4ff841: Fix precision scrolling when there is a scroll margin,
Po Lu <=