Module terminal.cursor.visible

Terminal cursor visibility module.

Provides utilities for cursor visibility in terminals.

Functions

set ([visible=true]) Shows or hides the cursor and writes it to the terminal.

Sequences

set_seq ([visible=true]) Returns the ansi sequence to show/hide the cursor without writing it to the terminal.

Stack based functions

apply () Returns the ansi sequence to show/hide the cursor at the top of the stack, and writes it to the terminal.
apply_seq () Returns the ansi sequence to show/hide the cursor at the top of the stack without writing it to the terminal.
pop ([n=1]) Pops n cursor visibility(ies) off the stack, and writes the last one to the terminal.
pop_seq ([n=1]) Pops n cursor visibility(ies) off the stack (and returns the last one), without writing it to the terminal.
push ([v=true]) Pushes a cursor visibility onto the stack, and writes it to the terminal.
push_seq ([v=true]) Pushes a cursor visibility onto the stack (and returns it), without writing it to the terminal.


Functions

set ([visible=true])
Shows or hides the cursor and writes it to the terminal.

Parameters:

  • visible boolean true to show, false to hide (default true)

Returns:

    true

Sequences

set_seq ([visible=true])
Returns the ansi sequence to show/hide the cursor without writing it to the terminal.

Parameters:

  • visible boolean true to show, false to hide (default true)

Returns:

    string ansi sequence to write to the terminal

Stack based functions

These functions provide direct access to the cursor position stack.
apply ()
Returns the ansi sequence to show/hide the cursor at the top of the stack, and writes it to the terminal.

Returns:

    true
apply_seq ()
Returns the ansi sequence to show/hide the cursor at the top of the stack without writing it to the terminal.

Returns:

    string ansi sequence to write to the terminal
pop ([n=1])
Pops n cursor visibility(ies) off the stack, and writes the last one to the terminal.

Parameters:

  • n number number of visibilities to pop (default 1)

Returns:

    true
pop_seq ([n=1])
Pops n cursor visibility(ies) off the stack (and returns the last one), without writing it to the terminal.

Parameters:

  • n number number of visibilities to pop (default 1)

Returns:

    string ansi sequence to write to the terminal
push ([v=true])
Pushes a cursor visibility onto the stack, and writes it to the terminal.

Parameters:

  • v boolean true to show, false to hide (default true)

Returns:

    true
push_seq ([v=true])
Pushes a cursor visibility onto the stack (and returns it), without writing it to the terminal.

Parameters:

  • v boolean true to show, false to hide (default true)

Returns:

    string ansi sequence to write to the terminal
generated by LDoc 1.5.0