[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 897a101: Make pixel scrolling through images at the first line sm
From: |
Po Lu |
Subject: |
master 897a101: Make pixel scrolling through images at the first line smoother |
Date: |
Fri, 26 Nov 2021 00:22:39 -0500 (EST) |
branch: master
commit 897a101cd3b7d6b46e3b14e80e3c77373246be6a
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Make pixel scrolling through images at the first line smoother
* lisp/better-pixel-scroll.el (better-pixel-scroll-scroll-up):
Try to reset vscroll if already vscrolled.
---
lisp/better-pixel-scroll.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/better-pixel-scroll.el b/lisp/better-pixel-scroll.el
index 6101778..c146910 100644
--- a/lisp/better-pixel-scroll.el
+++ b/lisp/better-pixel-scroll.el
@@ -88,10 +88,11 @@ the height of the current window."
(current-y (+ (cdr (posn-x-y posn))
(cdr (posn-object-width-height posn)))))
(while (< (- max-y current-y) delta)
- (when (zerop (vertical-motion -1))
- (set-window-vscroll nil 0)
- (signal 'beginning-of-buffer nil))
+ (vertical-motion -1)
(setq current-y (- current-y (line-pixel-height)))))
+ (let ((current-vscroll (window-vscroll nil t)))
+ (setq delta (- delta current-vscroll))
+ (set-window-vscroll nil 0 t))
(while (> delta 0)
(set-window-start nil (save-excursion
(goto-char (window-start))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 897a101: Make pixel scrolling through images at the first line smoother,
Po Lu <=