emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/scroll-on-drag f9379c56df 03/35: Call redisplay explicitly


From: ELPA Syncer
Subject: [nongnu] elpa/scroll-on-drag f9379c56df 03/35: Call redisplay explicitly
Date: Thu, 7 Jul 2022 12:02:43 -0400 (EDT)

branch: elpa/scroll-on-drag
commit f9379c56dfa10dae17837509a59db7452d83585a
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>

    Call redisplay explicitly
    
    Ensure re-display is performed after all necessary changes are made
---
 scroll-on-drag.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/scroll-on-drag.el b/scroll-on-drag.el
index 531a794a7c..56af588e18 100644
--- a/scroll-on-drag.el
+++ b/scroll-on-drag.el
@@ -73,6 +73,8 @@
     (
       ;; Don't run unnecessary logic when scrolling.
       (inhibit-point-motion-hooks t)
+      ;; Only draw explicitly once all actions have been done.
+      (inhibit-redisplay t)
 
       (has-scrolled nil)
       (scroll-timer nil)
@@ -234,6 +236,7 @@
 
             (lambda (self-fn)
               (funcall scroll-by-lines-fn lines)
+              (let ((inhibit-redisplay nil)) (redisplay))
               (funcall timer-start-fn self-fn)))
 
           ((eq scroll-on-drag-style 'line-by-pixel)
@@ -251,7 +254,8 @@
                   (unless (eq lines 0)
                     (setq delta-px-accum
                       (- delta-px-accum (* lines char-height)))
-                    (funcall scroll-by-lines-fn lines))))
+                    (funcall scroll-by-lines-fn lines)
+                    (let ((inhibit-redisplay nil)) (redisplay)))))
               (funcall timer-start-fn self-fn)))
 
           ((eq scroll-on-drag-style 'pixel)
@@ -263,6 +267,7 @@
                 (if (< delta-scaled 0)
                   (funcall scroll-down-by-pixels-fn (- delta-scaled))
                   (funcall scroll-up-by-pixels-fn delta-scaled))
+                (let ((inhibit-redisplay nil)) (redisplay))
                 (funcall timer-start-fn self-fn))))))
 
       (scroll-reset-fn
@@ -287,6 +292,7 @@
             ((eq event 'escape)
               (funcall scroll-reset-fn)
               (funcall scroll-restore-fn)
+              (let ((inhibit-redisplay nil)) (redisplay))
               t)
 
             ;; Space keeps current position, restarts scrolling.



reply via email to

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