Put the caret at offset (clamped), selecting from the old anchor when extend is set.
- edit: the text being edited.
- offset: the new byte offset.
- extend: keep the anchor, so the selection grows or shrinks.
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.