branch: elpa/git-commit commit 54d969b62fbb522492dacbf05cf51de02c822ebd Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
magit-insert-section--finish: Optimize for leaf sections --- lisp/magit-section.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/magit-section.el b/lisp/magit-section.el index b29a65f046..1e7f1970b8 100644 --- a/lisp/magit-section.el +++ b/lisp/magit-section.el @@ -1439,7 +1439,6 @@ anything this time around. (defun magit-insert-section--finish (obj) (run-hooks 'magit-insert-section-hook) - (magit-insert-child-count obj) (let ((beg (oref obj start)) (end (oset obj end (if magit-section-inhibit-markers @@ -1452,6 +1451,7 @@ anything this time around. (unless magit-section-inhibit-markers (set-marker-insertion-type beg t)) (cond (children + (magit-insert-child-count obj) (save-excursion (goto-char beg) (while (< (point) end)