Module terminal.cursor.position.stack
Cursor position stack.
Managing the cursor position based on a stack.
Functions
pop ([n=1]) | Pops the last n cursor positions off the stack, and writes an ansi sequence to move to the last one to the terminal. |
push ([new_row[, new_column]]) | Pushes the current cursor position onto the stack, and writes an ansi sequence to move to the new position (if applicable) to the terminal. |
Sequences
pop_seq ([n=1]) | Pops the last n cursor positions off the stack, and returns an ansi sequence to move to the last one without writing it to the terminal. |
push_seq ([new_row[, new_column]]) | Pushes the current cursor position onto the stack, and returns an ansi sequence to move to the new position (if applicable) without writing it to the terminal. |
Functions
- pop ([n=1])
-
Pops the last n cursor positions off the stack, and writes an ansi sequence to move to
the last one to the terminal.
Parameters:
- n number number of positions to pop (default 1)
Returns:
-
true
- push ([new_row[, new_column]])
-
Pushes the current cursor position onto the stack, and writes an ansi sequence to move to the new position (if applicable) to the terminal.
Calls position.get under the hood.
Parameters:
- new_row number (optional)
- new_column number (optional)
Returns:
-
true
Sequences
- pop_seq ([n=1])
-
Pops the last n cursor positions off the stack, and returns an ansi sequence to move to
the last one without writing it to the terminal.
Parameters:
- n number number of positions to pop (default 1)
Returns:
-
string
ansi sequence to write to the terminal
- push_seq ([new_row[, new_column]])
-
Pushes the current cursor position onto the stack, and returns an ansi sequence to move to the new position (if applicable) without writing it to the terminal.
Calls position.get under the hood.
Parameters:
- new_row number (optional)
- new_column number (optional)
Returns:
-
string
ansi sequence to write to the terminal, or an empty string if no position is given