Module terminal.scroll.stack

Terminal scroll stack module.

Manages a stack of scroll regions for terminal control.

Functions

apply () Applies the current scroll region by writing it to the terminal.
pop (n) Pops the specified number of scroll regions from the stack and applies the new top by writing to the terminal.
push (top, bottom) Pushes a new scroll region onto the stack and applies it by writing to the terminal.

Sequences

apply_seq () Retrieves the current scroll region sequence from the top of the stack.
pop_seq (n) Pops the specified number of scroll regions from the stack without applying it.
push_seq (top, bottom) Pushes a new scroll region onto the stack without applying it.


Functions

apply ()
Applies the current scroll region by writing it to the terminal.

Returns:

    true Always returns true after applying.
pop (n)
Pops the specified number of scroll regions from the stack and applies the new top by writing to the terminal.

Parameters:

  • n number The number of scroll regions to pop. Defaults to 1.

Returns:

    true Always returns true after applying.
push (top, bottom)
Pushes a new scroll region onto the stack and applies it by writing to the terminal.

Parameters:

  • top number The top line number of the scroll region.
  • bottom number The bottom line number of the scroll region.

Returns:

    true Always returns true after applying.

Sequences

apply_seq ()
Retrieves the current scroll region sequence from the top of the stack.

Returns:

    string The ANSI sequence representing the current scroll region.
pop_seq (n)
Pops the specified number of scroll regions from the stack without applying it.

Parameters:

  • n number The number of scroll regions to pop. Defaults to 1.

Returns:

    string The ANSI sequence representing the new top of the stack.
push_seq (top, bottom)
Pushes a new scroll region onto the stack without applying it.

Parameters:

  • top number The top line number of the scroll region.
  • bottom number The bottom line number of the scroll region.

Returns:

    string The ANSI sequence representing the pushed scroll region.
generated by LDoc 1.5.0