[Top][All Lists]

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

[elpa] scratch/add-vdiff e5d3633 226/258: Revert "vdiff-magit: Simplify

From: Justin Burkett
Subject: [elpa] scratch/add-vdiff e5d3633 226/258: Revert "vdiff-magit: Simplify stage"
Date: Wed, 17 May 2017 08:13:58 -0400 (EDT)

branch: scratch/add-vdiff
commit e5d36332e0d24090fd5a520dad6032f56896913b
Author: Justin Burkett <address@hidden>
Commit: Justin Burkett <address@hidden>

    Revert "vdiff-magit: Simplify stage"
    This reverts commit 219d7651d105c86ad928f7c94a7f83457766a232.
 vdiff-magit.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/vdiff-magit.el b/vdiff-magit.el
index 5943a9a..b1ad04f 100644
--- a/vdiff-magit.el
+++ b/vdiff-magit.el
@@ -226,16 +226,21 @@ FILE has to be relative to the top directory of the 
        (lambda (buf-a buf-b buf-c)
+         (when (and (buffer-live-p buf-a)
+                    (buffer-modified-p buf-a))
+           (kill-buffer buf-a))
          (when (and (buffer-live-p buf-b)
                     (buffer-modified-p buf-b))
            (with-current-buffer buf-b
-             (magit-update-index)))
+             (magit-update-index))
+           (kill-buffer buf-b))
          (when (and (buffer-live-p buf-c)
                     (buffer-modified-p buf-c))
            (with-current-buffer buf-c
              (when (y-or-n-p
                     (format "Save file %s? " buffer-file-name))
-               (save-buffer)))))
+               (save-buffer)))
+           (kill-buffer buf-c)))
        t t))))
 ;; ;;;###autoload

reply via email to

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