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

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

[elpa] scratch/add-vdiff eda4b1b 204/258: Force update of window-start i


From: Justin Burkett
Subject: [elpa] scratch/add-vdiff eda4b1b 204/258: Force update of window-start in manual calls to scroll func
Date: Wed, 17 May 2017 08:13:51 -0400 (EDT)

branch: scratch/add-vdiff
commit eda4b1bee033d3fde19a70ccfd2abbe278230f0e
Author: justbur <address@hidden>
Commit: justbur <address@hidden>

    Force update of window-start in manual calls to scroll func
---
 vdiff.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/vdiff.el b/vdiff.el
index 58ca0b9..3a56fec 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -1375,6 +1375,7 @@ buffer)."
 (defun vdiff--scroll-function (&optional window window-start)
   "Sync scrolling of all vdiff windows."
   (let* ((window (or window (selected-window)))
+         (update-window-start (null window-start))
          (window-start (or window-start (progn
                                           ;; redisplay updates window-start in
                                           ;; the case where the scroll function
@@ -1398,7 +1399,11 @@ buffer)."
         (when (and 2-pos 2-start-pos)
           (set-window-point 2-win 2-pos)
           ;; For some reason without this unless the vscroll gets eff'd
-          (unless (= (window-start 2-win) 2-start-pos)
+          (unless (= (progn
+                       (when update-window-start
+                         (redisplay))
+                       (window-start 2-win))
+                     2-start-pos)
             (set-window-start 2-win 2-start-pos))
           (vdiff--set-vscroll-and-force-update 2-win 2-scroll))
         (when vdiff-3way-mode



reply via email to

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