Module folding

Source
Expand description

Logical-line fold regions and discovery. Logical-line fold regions, discovery, and collapsed-state transfer.

Structs§

FoldRegion
Collapsible range of zero-based logical lines.
FoldRegionId
Packed identity for a fold region’s line range.

Functions§

collapsed_region_hiding_line
Returns the first collapsed region that hides line.
fold_region_at_line
Returns the index of the first non-empty region starting on line.
fold_regions_for_document
Discovers multi-line foldable constructs for a document.
line_for_byte
Counts newline bytes before a UTF-8 byte offset.
line_start_byte
Returns the UTF-8 byte offset at which a zero-based logical line starts.
merge_fold_regions_with_previous
Transfers collapsed state from matching previous region identifiers.