branch: scratch/add-vdiff
commit c46b76b2c13c870bb5adcd260721b3222aad016e
Author: justbur <[email protected]>
Commit: justbur <[email protected]>
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)