Return the section at point.
Return a list of the selected sections.
When the region is active and constitutes a valid section selection, then return a list of all selected sections. This is the case when the region begins in the heading of a section and ends in the heading of a sibling of that first section. When the selection is not valid then return nil. Most commands that can act on the selected sections, then instead just act on the current section, the one point is in.
When the region looks like it would in any other buffer then the
selection is invalid. When the selection is valid then the region
magit-section-highlight. This does not apply to diffs where
things get a bit more complicated, but even here if the region looks
like it usually does, then that’s not a valid selection as far as
this function is concerned.
Return a list of the values of the selected sections.
magit-region-sections whose doc-string explains when a
region is a valid section selection. If the region is not active
or is not a valid section selection, then return nil. If optional
TYPES is non-nil then the selection not only has to be valid; the
types of all selected sections additionally have to match one of
TYPES, or nil is returned.