]> git.eshelyaron.com Git - emacs.git/commitdiff
Allow customizing step between each interpolated scroll
authorPo Lu <luangruo@yahoo.com>
Thu, 9 Dec 2021 03:11:26 +0000 (11:11 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 9 Dec 2021 03:12:39 +0000 (11:12 +0800)
* lisp/pixel-scroll.el (pixel-scroll-precision-interpolate):
Use new option.
(pixel-scroll-precision-interpolation-between-scroll): New user
option.

lisp/pixel-scroll.el

index 94c14d50dca60d7144bbb0e8408e310bc314bc5a..2bef8ca5b0ea26dd025d037b624a4030733f8b99 100644 (file)
@@ -153,6 +153,12 @@ Nil means to not interpolate such scrolls."
   :type 'float
   :version "29.1")
 
+(defcustom pixel-scroll-precision-interpolation-between-scroll 0.001
+  "The number of seconds between each step of an interpolated scroll."
+  :group 'mouse
+  :type 'float
+  :version "29.1")
+
 (defun pixel-scroll-in-rush-p ()
   "Return non-nil if next scroll should be non-smooth.
 When scrolling request is delivered soon after the previous one,
@@ -546,7 +552,7 @@ animation."
         (factor pixel-scroll-precision-interpolation-factor)
         (last-time (float-time))
         (time-elapsed 0.0)
-        (between-scroll 0.001)
+        (between-scroll pixel-scroll-precision-interpolation-between-scroll)
         (rem (window-parameter nil 'interpolated-scroll-remainder))
         (time (window-parameter nil 'interpolated-scroll-remainder-time)))
     (when (and rem time