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

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

[elpa] externals/vlf 82fd5b9 203/310: Refine diff adjustment and in case


From: Stefan Monnier
Subject: [elpa] externals/vlf 82fd5b9 203/310: Refine diff adjustment and in case of equality after it - make another
Date: Sat, 28 Nov 2020 00:33:16 -0500 (EST)

branch: externals/vlf
commit 82fd5b943bda0cf9c99d615a7d78fdae3d8f73e7
Author: Andrey Kotlarski <m00naticus@gmail.com>
Commit: Andrey Kotlarski <m00naticus@gmail.com>

    Refine diff adjustment and in case of equality after it - make another
    search for difference.
---
 vlf-base.el  | 2 +-
 vlf-ediff.el | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/vlf-base.el b/vlf-base.el
index 68f098e..c6da794 100644
--- a/vlf-base.el
+++ b/vlf-base.el
@@ -168,7 +168,7 @@ bytes added to the end."
                                         (point-max)))))))
           (cond ((< vlf-start-pos start)
                  (let* ((del-pos (byte-to-position
-                                  (- start vlf-start-pos)))
+                                  (1+ (- start vlf-start-pos))))
                         (del-len (length (encode-coding-region
                                           (point-min) del-pos
                                           buffer-file-coding-system
diff --git a/vlf-ediff.el b/vlf-ediff.el
index 24d807e..b16942a 100644
--- a/vlf-ediff.el
+++ b/vlf-ediff.el
@@ -177,6 +177,9 @@ of difference list."
         (when (< 0 ediff-number-of-differences)
           (vlf-ediff-adjust buffer-A buffer-B t)
           (vlf-ediff-adjust buffer-A buffer-B)
+          (if (< 0 ediff-number-of-differences)
+              (save-excursion
+                (vlf-ediff-next buffer-A buffer-B 'vlf-next-chunk)))
           (ediff-jump-to-difference 1)))
     ad-do-it))
 
@@ -198,6 +201,9 @@ beginning of difference list."
         (when (< 0 ediff-number-of-differences)
           (vlf-ediff-adjust buffer-A buffer-B)
           (vlf-ediff-adjust buffer-A buffer-B t)
+          (if (< 0 ediff-number-of-differences)
+              (save-excursion
+                (vlf-ediff-next buffer-A buffer-B 'vlf-prev-chunk)))
           (ediff-jump-to-difference -1)))
     ad-do-it))
 



reply via email to

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