emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master cfb295f1e5: Prevent GC threshold from exceeding fixnum limit duri


From: Po Lu
Subject: master cfb295f1e5: Prevent GC threshold from exceeding fixnum limit during precision scrolling
Date: Tue, 2 Aug 2022 23:43:10 -0400 (EDT)

branch: master
commit cfb295f1e55e4d04beaad5d57ede494c436cf277
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    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.
---
 lisp/pixel-scroll.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el
index aefe3c12dc..6dba733b9c 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 ]."
     (let ((window (mwheel-event-window event))
           ;; The animations are smoother if the GC threshold is
           ;; reduced for the duration of the animation.
-          (gc-cons-threshold (* gc-cons-threshold 3))
+          (gc-cons-threshold (min most-positive-fixnum
+                                  (* gc-cons-threshold 3)))
           (state nil))
       (when (framep window)
         (setq window (frame-selected-window window)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]