branch: elpa/git-commit
commit f7cba11588c4a35f91922ef28658aa88a59c895b
Author: Jonas Bernoulli <jo...@bernoul.li>
Commit: Jonas Bernoulli <jo...@bernoul.li>

    magit-insert-section--finish: Fix delayed marker creation
    
    Fix regression added in [1: 153cba365f].  We are mapping over
    children; using the bounds of the parent was not intended.
    
    1: 2024-05-04 153cba365fe9678f4257b7277c3e1d60b94c979c
       magit-insert-section--finish: Avoid some oref calls
---
 lisp/magit-section.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 65e43846b8..5fa14dd275 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -1466,9 +1466,10 @@ anything this time around.
     (cond ((eq obj magit-root-section)
            (when (eq magit-section-inhibit-markers 'delay)
              (setq magit-section-inhibit-markers nil)
-             (magit-map-sections (lambda (section)
-                                   (oset section start (copy-marker beg t))
-                                   (oset section end   (copy-marker end t)))))
+             (magit-map-sections
+              (lambda (section)
+                (oset section start (copy-marker (oref section start) t))
+                (oset section end   (copy-marker (oref section end)   t)))))
            (let ((magit-section-cache-visibility nil))
              (magit-section-show obj)))
           (magit-section-insert-in-reverse

Reply via email to