Function: magit-status-goto-initial-section

magit-status-goto-initial-section is a natively compiled function defined in magit-status.el.

Signature

(magit-status-goto-initial-section)

Documentation

Jump to the section specified by magit-status-initial-section.

Source Code

;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/magit-status.el
(defun magit-status-goto-initial-section ()
  "Jump to the section specified by `magit-status-initial-section'."
  (when-let ((section
              (seq-some (lambda (initial)
                          (if (integerp initial)
                              (nth (1- initial)
                                   (magit-section-siblings
                                    (magit-current-section) 'next))
                            (magit-get-section initial)))
                        magit-status-initial-section)))
    (goto-char (oref section start))
    (when-let ((vis (cdr (assq 'magit-status-initial-section
                               magit-section-initial-visibility-alist))))
      (if (eq vis 'hide)
          (magit-section-hide section)
        (magit-section-show section)))))