UI module

move_vertically

procedure · 1 overloadsince 0.31.0Source

Move the caret lines lines up (negative) or down, keeping its horizontal position.

move_vertically :: (
    ui: *UI_State,
    edit: *Text_Edit,
    lines: int,
    style: Text_Style,
    extend: bool = false
)

Move the caret lines lines up (negative) or down, keeping its horizontal position.

Parameters

ui: *UI_State
the UI whose text system measures the lines.
edit: *Text_Edit
the text being edited.
lines: int
how many lines to move. Past either end the caret goes to the start or end of the text.
style: Text_Style
the style the lines are drawn in.
extend: bool
keep the anchor, so the selection grows or shrinks.

See also