From: Po Lu Date: Thu, 9 Dec 2021 03:11:26 +0000 (+0800) Subject: Allow customizing step between each interpolated scroll X-Git-Tag: emacs-29.0.90~3607^2~8 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bb1252bdb33c2ccb765fd3dc4cb94e508f13a0c6;p=emacs.git Allow customizing step between each interpolated scroll * lisp/pixel-scroll.el (pixel-scroll-precision-interpolate): Use new option. (pixel-scroll-precision-interpolation-between-scroll): New user option. --- diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el index 94c14d50dca..2bef8ca5b0e 100644 --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el @@ -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