diff options
| author | Po Lu | 2022-08-03 11:42:22 +0800 |
|---|---|---|
| committer | Po Lu | 2022-08-03 11:42:22 +0800 |
| commit | cfb295f1e55e4d04beaad5d57ede494c436cf277 (patch) | |
| tree | f053b75fcb137b9ea99e4ab31ee0ca063008ea59 | |
| parent | 9a9634dc725278a6a676fa4590f53543cada34b2 (diff) | |
| download | emacs-cfb295f1e55e4d04beaad5d57ede494c436cf277.tar.gz emacs-cfb295f1e55e4d04beaad5d57ede494c436cf277.zip | |
Prevent GC threshold from exceeding fixnum limit during precision scrolling
* lisp/pixel-scroll.el (pixel-scroll-start-momentum): Prevent GC
threshold from exceeding most-positive-fixnum.
| -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 aefe3c12dc2..6dba733b9c4 100644 --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el | |||
| @@ -761,7 +761,8 @@ It is a vector of the form [ VELOCITY TIME SIGN ]." | |||
| 761 | (let ((window (mwheel-event-window event)) | 761 | (let ((window (mwheel-event-window event)) |
| 762 | ;; The animations are smoother if the GC threshold is | 762 | ;; The animations are smoother if the GC threshold is |
| 763 | ;; reduced for the duration of the animation. | 763 | ;; reduced for the duration of the animation. |
| 764 | (gc-cons-threshold (* gc-cons-threshold 3)) | 764 | (gc-cons-threshold (min most-positive-fixnum |
| 765 | (* gc-cons-threshold 3))) | ||
| 765 | (state nil)) | 766 | (state nil)) |
| 766 | (when (framep window) | 767 | (when (framep window) |
| 767 | (setq window (frame-selected-window window))) | 768 | (setq window (frame-selected-window window))) |