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

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

[elpa] scratch/add-vdiff 74ebab6 143/258: Don't move point when closing


From: Justin Burkett
Subject: [elpa] scratch/add-vdiff 74ebab6 143/258: Don't move point when closing all folds
Date: Wed, 17 May 2017 08:13:39 -0400 (EDT)

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

    Don't move point when closing all folds
---
 vdiff.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/vdiff.el b/vdiff.el
index d9e2d69..4bf3813 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -1204,14 +1204,16 @@ folds in the region."
 (defun vdiff-open-all-folds ()
   "Open all folds in both buffers"
   (interactive)
-  (setq vdiff--all-folds-open t)
-  (vdiff-open-fold (point-min) (point-max)))
+  (save-excursion
+    (setq vdiff--all-folds-open t)
+    (vdiff-open-fold (point-min) (point-max))))
 
 (defun vdiff-close-all-folds ()
   "Close all folds in both buffers"
   (interactive)
-  (setq vdiff--all-folds-open nil)
-  (vdiff-close-fold (point-min) (point-max)))
+  (save-excursion
+    (setq vdiff--all-folds-open nil)
+    (vdiff-close-fold (point-min) (point-max))))
 
 (defun vdiff-close-other-folds ()
   "Close all other folds in both buffers"



reply via email to

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