branch: elpa/dslide
commit c48dc05cb67679f795e2f779372f67f1d1bc1bfd
Author: Psionik K <[email protected]>
Commit: Psionik K <[email protected]>

    set up animation before changing buffer restriction
    
    once more, a hoped fix for some cases of flicker
    
    Signed-off-by: Psionik K <[email protected]>
---
 dslide.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/dslide.el b/dslide.el
index 52aee22696..7c1cae59d6 100644
--- a/dslide.el
+++ b/dslide.el
@@ -1306,15 +1306,14 @@ restriction, meaning no progress was made."
           (setq progress begin))
       (unless (and (<= (point-min) begin)
                    (>= (point-max) end))
-        ;; TODO overlay-based display
+        (when (and dslide-slide-in-effect
+                   (not (oref obj inline)))
+          (dslide-animation-setup begin end))
         (narrow-to-region begin end)
         (run-hooks 'dslide-narrow-hook)
         (let ((dslide-header (oref obj header)))
           (dslide--make-header (null (oref obj breadcrumbs))))
         (goto-char (point-min))         ; necessary to reset the scroll
-        (when (and dslide-slide-in-effect
-                   (not (oref obj inline)))
-          (dslide-animation-setup begin end))
         (setq progress begin)))
     ;; Return progress to count as step when re-narrowing after a child.
     progress))

Reply via email to