Raxol.Terminal.Emulator.Buffer (Raxol v0.5.0)
View SourceProvides buffer management functionality for the terminal emulator.
Summary
Functions
Clears the entire buffer.
Clears from cursor to end of screen.
Clears from start of screen to cursor.
Clears the current line.
Clears the scroll region, allowing scrolling of the entire screen. Returns {:ok, updated_emulator}.
Scrolls the buffer down by the specified number of lines.
Scrolls the buffer up by the specified number of lines.
Sets the scroll region for the active buffer. Returns {:ok, updated_emulator} or {:error, reason}.
Switches between main and alternate screen buffers. Returns {:ok, updated_emulator} or {:error, reason}.
Functions
Clears the entire buffer.
Clears from cursor to end of screen.
Clears from start of screen to cursor.
Clears the current line.
@spec clear_scroll_region(Raxol.Terminal.Emulator.Struct.t()) :: {:ok, Raxol.Terminal.Emulator.Struct.t()}
Clears the scroll region, allowing scrolling of the entire screen. Returns {:ok, updated_emulator}.
Scrolls the buffer down by the specified number of lines.
Scrolls the buffer up by the specified number of lines.
@spec set_scroll_region( Raxol.Terminal.Emulator.Struct.t(), non_neg_integer(), non_neg_integer() ) :: {:ok, Raxol.Terminal.Emulator.Struct.t()} | {:error, String.t()}
Sets the scroll region for the active buffer. Returns {:ok, updated_emulator} or {:error, reason}.
@spec switch_buffer(Raxol.Terminal.Emulator.Struct.t(), :main | :alternate) :: {:ok, Raxol.Terminal.Emulator.Struct.t()} | {:error, String.t()}
Switches between main and alternate screen buffers. Returns {:ok, updated_emulator} or {:error, reason}.