branch: elpa/magit commit ee0d9b90c3f38dd0604190b2ba9da81c6009729e Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
magit-section--opportunistic-wash: Move renamed function --- lisp/magit-section.el | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/lisp/magit-section.el b/lisp/magit-section.el index bf5ad34094..b53996ca52 100644 --- a/lisp/magit-section.el +++ b/lisp/magit-section.el @@ -912,7 +912,7 @@ With a prefix argument also expand it." heading) "Show the body of the current section." (interactive (list (magit-current-section))) (oset section hidden nil) - (magit-section--maybe-wash section) + (magit-section--opportunistic-wash section) (when-let ((beg (oref section content))) (remove-overlays beg (oref section end) 'invisible t)) (magit-section-maybe-update-visibility-indicator section) @@ -922,22 +922,6 @@ With a prefix argument also expand it." heading) (magit-section-hide child) (magit-section-show child)))) -(defun magit-section--maybe-wash (section) - (when-let ((washer (oref section washer))) - (oset section washer nil) - (let ((inhibit-read-only t) - (magit-insert-section--parent section) - (magit-insert-section--current section) - (content (oref section content))) - (save-excursion - (if (and content (< content (oref section end))) - (funcall washer section) ; already partially washed (hunk) - (goto-char (oref section end)) - (oset section content (point-marker)) - (funcall washer) - (oset section end (point-marker))))) - (setq magit-section-highlight-force-update t))) - (defun magit-section-hide (section) "Hide the body of the current section." (interactive (list (magit-current-section))) @@ -1677,6 +1661,22 @@ evaluated its BODY. Admittedly that's a bit of a hack." (delete-char 1) (insert (format "%s" count))))))) +(defun magit-section--opportunistic-wash (section) + (when-let ((washer (oref section washer))) + (oset section washer nil) + (let ((inhibit-read-only t) + (magit-insert-section--parent section) + (magit-insert-section--current section) + (content (oref section content))) + (save-excursion + (if (and content (< content (oref section end))) + (funcall washer section) ; already partially washed (hunk) + (goto-char (oref section end)) + (oset section content (point-marker)) + (funcall washer) + (oset section end (point-marker))))) + (setq magit-section-highlight-force-update t))) + ;;; Highlight (defun magit-section-pre-command-hook ()