Internal retained visual-row entry for semantic window builds.
Summary
Functions
Resolves a modal pointer target to a character in the displayed row.
Resolves a row-local composed UTF-16 boundary to a source position.
Resolves a row-local composed UTF-16 boundary with explicit affinity.
Types
@type t() :: %MingaEditor.RenderModel.Window.VisualRow{ buf_line: non_neg_integer(), composed_end_utf16: non_neg_integer(), composed_start_utf16: non_neg_integer(), display_row: non_neg_integer(), indent_width: non_neg_integer(), input_hash: non_neg_integer() | nil, reused?: boolean(), row: Minga.RenderModel.Window.Row.t(), row_width: non_neg_integer(), source_end_byte: non_neg_integer(), source_end_col: non_neg_integer(), source_offset_map: MingaEditor.RenderModel.Window.SourceOffsetMap.t(), source_start_byte: non_neg_integer(), source_start_col: non_neg_integer(), source_text: String.t(), visual_index: non_neg_integer(), wrap_line_hash: non_neg_integer() | nil }
Functions
@spec new( Minga.RenderModel.Window.Row.t(), MingaEditor.RenderModel.Window.SourceOffsetMap.t(), non_neg_integer(), non_neg_integer(), non_neg_integer() ) :: t()
@spec reposition(t(), non_neg_integer()) :: t()
@spec retained_row(t()) :: {Minga.RenderModel.Window.Row.row_id(), {non_neg_integer(), Minga.RenderModel.Window.Row.t()}}
@spec source_character_position(t(), non_neg_integer()) :: {:ok, {non_neg_integer(), non_neg_integer()}} | :not_source_backed
Resolves a modal pointer target to a character in the displayed row.
A hit at or beyond the row end targets its final composed grapheme, so a soft-wrap boundary does not select the next row's first character. The source map preserves Unicode grapheme boundaries, replacement ranges, and virtual-text anchors. Empty and non-source rows retain their existing boundary behavior.
@spec source_position(t(), non_neg_integer()) :: {:ok, {non_neg_integer(), non_neg_integer()}} | :not_source_backed
Resolves a row-local composed UTF-16 boundary to a source position.
Wrap indentation resolves to the row's first source byte. Offsets past the rendered row resolve to its final source byte. Inline virtual text resolves to its anchor, and fold-summary text resolves to source end-of-line.
@spec source_position( t(), non_neg_integer(), MingaEditor.RenderModel.Window.SourceOffsetMap.affinity() ) :: {:ok, {non_neg_integer(), non_neg_integer()}} | :not_source_backed
Resolves a row-local composed UTF-16 boundary with explicit affinity.
Inside replacement text or a grapheme's UTF-16 range, :start chooses the
preceding source boundary and :end chooses the following source boundary.
@spec with_display_row(t(), non_neg_integer()) :: t()
@spec with_retention(t(), non_neg_integer(), boolean()) :: t()
@spec with_wrap_line_hash(t(), non_neg_integer()) :: t()