ansikit.cursor

Cursor-manipulating functions and escape sequences.

cursorUp

Signature → ([number]) -> nil

Moves the cursor up n characters. n defaults to 1.

cursorDown

Signature → ([number]) -> nil

Moves the cursor down n characters. n defaults to 1.

cursorForward

Signature → ([number]) -> nil

Moves the cursor forward n characters. n defaults to 1.

cursorBack

Signature → ([number]) -> nil

Moves the cursor back n characters. n defaults to 1.

cursorNextLn

Signature → ([number]) -> nil

Moves the cursor to the next n lines. n defaults to 1.

cursorPreviousLn

Signature → ([number]) -> nil

Moves the cursor to the previous n lines. n defaults to 1.

cursorSetColumn

Signature → ([number]) -> nil

Moves the cursor to column n. n defaults to 1.

cursorMove

Signature → (string, [number]) -> nil

Takes a direction from up, down, forward, back, nextline, previousline, column and moves n in that direction. n defaults to 1.

cursorSetPosition

Signature → (number, number) -> nil

Sets the cursor position to x and y.

cursorSetPosition1

Signature → (number) -> (number) -> nil

Curried version of cursorPosition.

cursorSave

Signature → nil

Saves the current cursor position.

cursorRestore

Signature → nil

Restores the previously saved cursor position.

Source

cursor.moon