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

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

[elpa] scratch/add-vdiff c46b76b 111/258: Set window point on scroll


From: Justin Burkett
Subject: [elpa] scratch/add-vdiff c46b76b 111/258: Set window point on scroll
Date: Wed, 17 May 2017 08:13:33 -0400 (EDT)

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

    Set window point on scroll
---
 vdiff.el | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/vdiff.el b/vdiff.el
index 8db5cde..f1fe921 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -1003,19 +1003,20 @@ buffer)."
              (other-window (if in-b win-a win-b))
              (other-buffer (if in-b buf-a buf-b))
              (this-start-line (line-number-at-pos window-start))
-             (this-line (+ (count-lines window-start (point))
-                           this-start-line))
-             (start-translation (vdiff--translate-line this-start-line in-b))
-             (translation (vdiff--translate-line this-line in-b))
+             (start-translation
+              (vdiff--translate-line this-start-line in-b))
              (other-curr-start (window-start other-window))
              (other-start-line (car start-translation))
              (other-start-pos (vdiff--pos-at-line-beginning
                                other-start-line other-buffer))
              (scroll-amt (cdr start-translation))
+             (this-line (+ (count-lines window-start (point))
+                           this-start-line))
+             (translation (vdiff--translate-line this-line in-b))
              (other-pos (vdiff--pos-at-line-beginning
                          (car translation) other-buffer))
-             (vdiff--in-scroll-hook t)
-             other-rel-line)
+             (vdiff--in-scroll-hook t))
+        (set-window-point other-window other-pos)
         (unless (= other-curr-start other-start-pos)
           (set-window-start other-window other-start-pos))
         (when (eq vdiff-subtraction-style 'full)



reply via email to

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