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

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

[elpa] scratch/add-vdiff 87ade86 192/258: Always move to start of fold o


From: Justin Burkett
Subject: [elpa] scratch/add-vdiff 87ade86 192/258: Always move to start of fold on close
Date: Wed, 17 May 2017 08:13:49 -0400 (EDT)

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

    Always move to start of fold on close
---
 vdiff.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/vdiff.el b/vdiff.el
index 97ae844..910532e 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -1414,6 +1414,8 @@ buffer)."
 
 (defun vdiff--set-closed-fold-props (ovr)
   "Set overlay properties to close fold OVR."
+  (when (vdiff--point-in-fold-p ovr)
+    (goto-char (overlay-start ovr)))
   (overlay-put ovr 'vdiff-fold-open nil)
   (overlay-put ovr 'before-string nil)
   (overlay-put ovr 'line-prefix nil)
@@ -1442,7 +1444,6 @@ folds in the region."
   (dolist (ovr (overlays-in beg end))
     (when (eq (overlay-get ovr 'vdiff-type) 'fold)
       (setf (vdiff-session-all-folds-open vdiff--session) nil)
-      (goto-char (overlay-start ovr))
       (vdiff--set-closed-fold-props ovr)
       (dolist (other-fold (overlay-get ovr 'vdiff-other-folds))
         (vdiff--set-closed-fold-props other-fold)))))



reply via email to

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