Function: magit-focused-sections
magit-focused-sections is a byte-compiled function defined in
magit-section.el.
Signature
(magit-focused-sections)
Documentation
Return a list of the selected sections and all their descendants.
If no sections are selected return a list of the current section and its descendants, except if that is the root section, in which case return nil.
Source Code
;; Defined in ~/.emacs.d/elpa/magit-section-20260330.1102/magit-section.el
(defun magit-focused-sections ()
"Return a list of the selected sections and all their descendants.
If no sections are selected return a list of the current section and
its descendants, except if that is the root section, in which case
return nil."
(or magit-section-focused-sections
(setq magit-section-focused-sections
(let ((current (magit-current-section)))
(and (not (eq current magit-root-section))
(let (sections)
(letrec ((collect (lambda (section)
(mapc collect (oref section children))
(push section sections))))
(mapc collect
(or (magit-region-sections) (list current))))
sections))))))