Function: magit--imenu-goto-function

magit--imenu-goto-function is a byte-compiled function defined in magit-section.el.

Signature

(magit--imenu-goto-function NAME POSITION &rest REST)

Documentation

Go to the section at POSITION.

Make sure it is visible, by showing its ancestors where necessary. For use as imenu-default-goto-function(var)/imenu-default-goto-function(fun) in magit-mode buffers.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-section-20260330.1102/magit-section.el
(defun magit--imenu-goto-function (_name position &rest _rest)
  "Go to the section at POSITION.
Make sure it is visible, by showing its ancestors where
necessary.  For use as `imenu-default-goto-function' in
`magit-mode' buffers."
  (goto-char position)
  (let ((section (magit-current-section)))
    (while (setq section (oref section parent))
      (when (oref section hidden)
        (magit-section-show section)))))