UI module

move_caret

procedure · 1 overloadsince 0.31.0Source

Put the caret at offset (clamped), selecting from the old anchor when extend is set.

move_caret :: (edit: *Text_Edit, offset: int, extend: bool = false)

Put the caret at offset (clamped), selecting from the old anchor when extend is set.

Parameters

edit: *Text_Edit
the text being edited.
offset: int
the new byte offset.
extend: bool
keep the anchor, so the selection grows or shrinks.

See also