branch: elpa/git-commit commit 3695493ce8a8427434af50d1336ea8041434b9f3 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
magit-insert-section--finish: Fix collecting children Children are being pushed to the `children' slot of the object, not the `children' variable that was added in [1: 4ec4d0272e]. 1: 2024-05-04 4ec4d0272e6c50f10ccc96350ed917a3e8d3313a magit-insert-section--finish: Optimize propertizing leaf sections --- lisp/magit-section.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lisp/magit-section.el b/lisp/magit-section.el index 065cec21ee..65e43846b8 100644 --- a/lisp/magit-section.el +++ b/lisp/magit-section.el @@ -1446,12 +1446,11 @@ anything this time around. (point-marker)))) (props `( magit-section ,obj ,@(and-let* ((map (symbol-value (oref obj keymap)))) - (list 'keymap map)))) - (children (oref obj children))) + (list 'keymap map))))) (unless magit-section-inhibit-markers (set-marker-insertion-type beg t)) (cond ((eq obj magit-root-section)) - (children + ((oref obj children) (magit-insert-child-count obj) (magit-section-maybe-add-heading-map obj) (save-excursion @@ -1479,7 +1478,7 @@ anything this time around. (nconc (oref parent children) (list obj)))))) (when magit-section-insert-in-reverse - (oset obj children (nreverse children))))) + (oset obj children (nreverse (oref obj children)))))) (defun magit-cancel-section (&optional if-empty) "Cancel inserting the section that is currently being inserted.