Incrementally maintained merge conflict coordinates for one buffer.
The index stores marker lines and lightweight regions. An edit scans only the replaced lines, shifts later markers, and rebuilds region structure from the marker sequence. Conflict side text stays in the document and is read only when a resolution command needs it.
Summary
Functions
Updates the index after one edit.
Returns the conflict count.
Returns the indexed conflict entries.
Builds the initial index from a document.
Types
@type marker() :: {line :: non_neg_integer(), marker_kind()}
@type marker_kind() :: :start | :base | :separator | :end
@type t() :: %Minga.Buffer.ConflictIndex{ entries: [Minga.Git.MergeConflict.Entry.t()], markers: [marker()] }
Functions
@spec apply_edit(t(), Minga.Buffer.Document.t(), Minga.Buffer.EditDelta.t()) :: t()
Updates the index after one edit.
@spec count(t()) :: non_neg_integer()
Returns the conflict count.
@spec entries(t()) :: [Minga.Git.MergeConflict.Entry.t()]
Returns the indexed conflict entries.
@spec new(Minga.Buffer.Document.t()) :: t()
Builds the initial index from a document.