Make reset more robust

This commit is contained in:
Greg Sexton 2014-05-05 11:35:23 +01:00
parent 2edbbdf3e7
commit 09a5b5fd01

View File

@ -527,11 +527,7 @@ as to ensure seeing where POINT is."
(defun origami-reset (buffer)
(interactive (list (current-buffer)))
(let ((tree (origami-get-fold-tree buffer)))
(origami-fold-diff tree (origami-store-cached-tree buffer (origami-fold-root-node))
(origami-create-overlay-from-fold-tree-fn buffer)
(origami-delete-overlay-from-fold-tree-fn buffer)
(origami-change-overlay-from-fold-node-fn buffer)))
(origami-store-cached-tree buffer (origami-fold-root-node))
(origami-remove-all-overlays buffer))
;;; minor mode