[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scroll-on-jump 2d37860e28: Fix #9: Only use 'sit-for' work
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scroll-on-jump 2d37860e28: Fix #9: Only use 'sit-for' workaround only for PGTK |
Date: |
Sun, 29 Jan 2023 07:59:44 -0500 (EST) |
branch: elpa/scroll-on-jump
commit 2d37860e2868f6dccc71b4b4d74094f35aad35df
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Fix #9: Only use 'sit-for' workaround only for PGTK
---
scroll-on-jump.el | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/scroll-on-jump.el b/scroll-on-jump.el
index b697914d2c..4620438c72 100644
--- a/scroll-on-jump.el
+++ b/scroll-on-jump.el
@@ -226,7 +226,9 @@ Moving the point when ALSO-MOVE-POINT is set."
(time-limit
(* scroll-on-jump-duration
(min 1.0 (/ (float (abs lines-scroll)) (float (window-body-height
window))))))
- (interp-fn (scroll-on-jump--interp-fn-get scroll-on-jump-curve)))
+ (interp-fn (scroll-on-jump--interp-fn-get scroll-on-jump-curve))
+ ;; FIXME: for some reason a short sleep is needed to prevent choppy
scrolling.
+ (use-pgtk-workaround (eq (window-system) 'pgtk)))
;; Animated scrolling (early exit on input to avoid annoying lag).
(cond
@@ -266,8 +268,8 @@ Moving the point when ALSO-MOVE-POINT is set."
(when (< lines-done-abs lines-scroll-abs)
;; Force `redisplay', without this redrawing can be a little
choppy.
(redisplay t)
- ;; FIXME: for some reason a short sleep is needed to prevent
choppy scrolling.
- (sit-for 0.01)))
+ (when use-pgtk-workaround
+ (sit-for 0.01))))
(setq is-early-exit nil))
;; Re-enable when editing logic.
@@ -294,7 +296,9 @@ Argument ALSO-MOVE-POINT moves the point while scrolling."
(* scroll-on-jump-duration
(min 1.0 (/ (float (abs lines-scroll)) (float (window-body-height
window))))))
(interp-fn (scroll-on-jump--interp-fn-get scroll-on-jump-curve))
- (char-height (frame-char-height (window-frame window))))
+ (char-height (frame-char-height (window-frame window)))
+ ;; FIXME: for some reason a short sleep is needed to prevent choppy
scrolling.
+ (use-pgtk-workaround (eq (window-system) 'pgtk)))
;; Animated scrolling (early exit on input to avoid annoying lag).
(cond
@@ -347,8 +351,8 @@ Argument ALSO-MOVE-POINT moves the point while scrolling."
(when (< px-done-abs px-scroll-abs)
;; Force `redisplay', without this redrawing can be a little
choppy.
(redisplay t)
- ;; FIXME: for some reason a short sleep is needed to prevent
choppy scrolling.
- (sit-for 0.01)))
+ (when use-pgtk-workaround
+ (sit-for 0.01))))
(setq is-early-exit nil))
(cond
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/scroll-on-jump 2d37860e28: Fix #9: Only use 'sit-for' workaround only for PGTK,
ELPA Syncer <=