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

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

[elpa] scratch/add-vdiff 0dc9fde 114/258: Try not to move point on chang


From: Justin Burkett
Subject: [elpa] scratch/add-vdiff 0dc9fde 114/258: Try not to move point on change transmission
Date: Wed, 17 May 2017 08:13:34 -0400 (EDT)

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

    Try not to move point on change transmission
---
 vdiff.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/vdiff.el b/vdiff.el
index 7380ee2..e0f4d2e 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -815,11 +815,11 @@ changes under point or on the immediately preceding line."
                   (overlay-start ovr)
                   (overlay-end ovr))))
       (with-current-buffer (vdiff--other-buffer)
-        (goto-char (overlay-start other-ovr))
-        (unless addition
-          (delete-region (overlay-start other-ovr)
-                         (overlay-end other-ovr)))
         (save-excursion
+          (goto-char (overlay-start other-ovr))
+          (unless addition
+            (delete-region (overlay-start other-ovr)
+                           (overlay-end other-ovr)))
           (insert text))
         (delete-overlay other-ovr))
       (delete-overlay ovr))))
@@ -833,7 +833,8 @@ just deleting text in the other buffer."
       (when other-ovr
         (with-current-buffer (vdiff--other-buffer)
           (delete-region (overlay-start other-ovr)
-                         (overlay-end other-ovr)))))))
+                         (overlay-end other-ovr))
+          (delete-overlay other-ovr))))))
 
 ;; * Scrolling and line syncing
 



reply via email to

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