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

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

[elpa] scratch/add-vdiff f2aaa2e 067/258: Fix goto-corresponding-line


From: Justin Burkett
Subject: [elpa] scratch/add-vdiff f2aaa2e 067/258: Fix goto-corresponding-line
Date: Wed, 17 May 2017 08:13:24 -0400 (EDT)

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

    Fix goto-corresponding-line
---
 vdiff.el | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/vdiff.el b/vdiff.el
index 562c7b6..0d769a6 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -675,13 +675,10 @@ changes under point or on the immediately preceding line."
 (defun vdiff-goto-corresponding-line (line in-b)
   "Jump to the line in the other vdiff buffer that corresponds to
 the current one."
-  (interactive (list (line-number-at-pos)
-                     (not (vdiff--buffer-a-p))))
+  (interactive (list (line-number-at-pos) (vdiff--buffer-b-p)))
   (vdiff-refresh)
-  (let* ((new-line (vdiff--translate-line line in-b))
-         (new-pos (vdiff--pos-at-line-beginning new-line)))
-    (select-window (vdiff--other-window))
-    (goto-char new-pos)))
+  (select-window (vdiff--other-window))
+  (vdiff--move-to-line (vdiff--translate-line line in-b)))
 
 (defun vdiff--sync-line (line in-a)
   "Sync point in the other vdiff buffer to the line in this



reply via email to

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