]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/pixel-scroll.el (pixel-scroll-start-momentum): Fix algorithm.
authorPo Lu <luangruo@yahoo.com>
Fri, 3 Dec 2021 00:59:24 +0000 (08:59 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 3 Dec 2021 00:59:24 +0000 (08:59 +0800)
lisp/pixel-scroll.el

index a45a4d41c33c5212621f3f83626a8e22b515a2a2..00d9bf684eebb2baa9c60a0e7b28977a32d2dffa 100644 (file)
@@ -549,7 +549,8 @@ It is a vector of the form [ VELOCITY TIME ]."
           (unwind-protect (progn
                             (aset state 0
                                   (/ (pixel-scroll-calculate-velocity state) 2))
-                            (let ((velocity (aref state 0)))
+                            (let ((velocity (* (aref state 0)
+                                               pixel-scroll-precision-momentum-tick)))
                               (if (> velocity 0)
                                   (while (> velocity 1)
                                     (pixel-scroll-precision-scroll-up (round velocity))