A highlight span with pre-resolved colors and attributes.
Spans reference display columns in the composed text. They never resolve editor-local resources such as secondary font registrations; builders pass the already-resolved font_id when a span needs one.
Summary
Functions
Builds a span from a Face.t() struct and display-column range.
Clips a span to a source display-column range and rebases it into a visual row.
Types
@type t() :: %Minga.RenderModel.Window.Span{ attrs: non_neg_integer(), bg: non_neg_integer(), end_col: non_neg_integer(), fg: non_neg_integer(), font_id: non_neg_integer(), font_weight: non_neg_integer(), start_col: non_neg_integer() }
Functions
@spec from_face( Minga.Core.Face.t(), non_neg_integer(), non_neg_integer(), non_neg_integer() ) :: t()
Builds a span from a Face.t() struct and display-column range.
@spec rebase_to_visual_row( t(), non_neg_integer(), non_neg_integer(), non_neg_integer() ) :: [t()]
Clips a span to a source display-column range and rebases it into a visual row.