diff options
| author | Po Lu | 2021-12-03 08:59:24 +0800 |
|---|---|---|
| committer | Po Lu | 2021-12-03 08:59:24 +0800 |
| commit | ef2c386829418a2c279ddf0ed217ee725bebed2f (patch) | |
| tree | b55e0276f254f44c658956a53fdc6ed58d45ba6b | |
| parent | f5f5297a9254bb2da751da184eaf03a919a1766a (diff) | |
| download | emacs-ef2c386829418a2c279ddf0ed217ee725bebed2f.tar.gz emacs-ef2c386829418a2c279ddf0ed217ee725bebed2f.zip | |
* lisp/pixel-scroll.el (pixel-scroll-start-momentum): Fix algorithm.
| -rw-r--r-- | lisp/pixel-scroll.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el index a45a4d41c33..00d9bf684ee 100644 --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el | |||
| @@ -549,7 +549,8 @@ It is a vector of the form [ VELOCITY TIME ]." | |||
| 549 | (unwind-protect (progn | 549 | (unwind-protect (progn |
| 550 | (aset state 0 | 550 | (aset state 0 |
| 551 | (/ (pixel-scroll-calculate-velocity state) 2)) | 551 | (/ (pixel-scroll-calculate-velocity state) 2)) |
| 552 | (let ((velocity (aref state 0))) | 552 | (let ((velocity (* (aref state 0) |
| 553 | pixel-scroll-precision-momentum-tick))) | ||
| 553 | (if (> velocity 0) | 554 | (if (> velocity 0) |
| 554 | (while (> velocity 1) | 555 | (while (> velocity 1) |
| 555 | (pixel-scroll-precision-scroll-up (round velocity)) | 556 | (pixel-scroll-precision-scroll-up (round velocity)) |