Function: magit-section-position-in-heading-p

magit-section-position-in-heading-p is a byte-compiled function defined in magit-section.el.

Signature

(magit-section-position-in-heading-p &optional SECTION POS)

Documentation

Return t if POSITION is inside the heading of SECTION.

POSITION defaults to point and SECTION defaults to the current section.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-section-20260330.1102/magit-section.el
(defun magit-section-position-in-heading-p (&optional section pos)
  "Return t if POSITION is inside the heading of SECTION.
POSITION defaults to point and SECTION defaults to the
current section."
  (unless section
    (setq section (magit-current-section)))
  (unless pos
    (setq pos (point)))
  (ignore-errors ; Allow navigating broken sections.
    (and section
         (>= pos (oref section start))
         (<  pos (or (oref section content)
                     (oref section end)))
         t)))