Resolves editor positions into concrete places in document text.
A position is still stored as {line, column} for the rest of the editor, but this module owns the translation between that editor-facing coordinate and the document's internal text point.
Summary
Functions
Returns the point immediately after the character at point.
Returns the on-screen column for an editor position.
Returns the editor position at a document point.
Returns the position of the last selectable character on a line.
Returns the document point for an editor position.
Returns the document point for an editor position against an existing line index.
Types
@type point() :: non_neg_integer()
An absolute point in the document text.
@type t() :: {line :: non_neg_integer(), column :: non_neg_integer()}
A zero-indexed editor position.
Functions
Returns the point immediately after the character at point.
@spec display_column(Minga.Buffer.Document.t(), t()) :: non_neg_integer()
Returns the on-screen column for an editor position.
@spec from_point(Minga.Buffer.Document.t(), point()) :: t()
Returns the editor position at a document point.
@spec last_character_on_line(String.t()) :: non_neg_integer()
Returns the position of the last selectable character on a line.
@spec point_for(Minga.Buffer.Document.t(), t()) :: point()
Returns the document point for an editor position.
@spec point_in( Minga.Buffer.Lines.line_starts(), non_neg_integer(), non_neg_integer(), non_neg_integer() ) :: point()
Returns the document point for an editor position against an existing line index.