Raxol.Terminal.Buffer.Scrollback (Raxol v0.5.0)
View SourceHandles scrollback buffer operations for the screen buffer. This module manages the history of lines that have scrolled off the screen, including adding, retrieving, and clearing scrollback content.
Summary
Functions
Adds a line to the scrollback buffer.
Adds multiple lines to the scrollback buffer.
Clears the scrollback buffer.
Checks if the scrollback buffer is full.
Gets the current scrollback limit.
Gets a specific line from the scrollback buffer.
Gets lines from the scrollback buffer.
Gets the newest line in the scrollback buffer.
Gets the oldest line in the scrollback buffer.
Returns a new scrollback buffer with default settings.
Sets the scrollback limit.
Gets the total number of lines in the scrollback buffer.
Types
Functions
@spec add_line(Raxol.Terminal.ScreenBuffer.t(), [Raxol.Terminal.Cell.t()]) :: Raxol.Terminal.ScreenBuffer.t()
Adds a line to the scrollback buffer.
@spec add_lines(Raxol.Terminal.ScreenBuffer.t(), [[Raxol.Terminal.Cell.t()]]) :: Raxol.Terminal.ScreenBuffer.t()
Adds multiple lines to the scrollback buffer.
@spec clear(Raxol.Terminal.ScreenBuffer.t()) :: Raxol.Terminal.ScreenBuffer.t()
Clears the scrollback buffer.
@spec full?(Raxol.Terminal.ScreenBuffer.t()) :: boolean()
Checks if the scrollback buffer is full.
@spec get_limit(Raxol.Terminal.ScreenBuffer.t()) :: non_neg_integer()
Gets the current scrollback limit.
@spec get_line(Raxol.Terminal.ScreenBuffer.t(), non_neg_integer()) :: [Raxol.Terminal.Cell.t()] | nil
Gets a specific line from the scrollback buffer.
@spec get_lines(Raxol.Terminal.ScreenBuffer.t(), non_neg_integer(), non_neg_integer()) :: [ [Raxol.Terminal.Cell.t()] ]
Gets lines from the scrollback buffer.
@spec get_newest_line(Raxol.Terminal.ScreenBuffer.t()) :: [Raxol.Terminal.Cell.t()] | nil
Gets the newest line in the scrollback buffer.
@spec get_oldest_line(Raxol.Terminal.ScreenBuffer.t()) :: [Raxol.Terminal.Cell.t()] | nil
Gets the oldest line in the scrollback buffer.
@spec new() :: t()
Returns a new scrollback buffer with default settings.
@spec set_limit(Raxol.Terminal.ScreenBuffer.t(), non_neg_integer()) :: Raxol.Terminal.ScreenBuffer.t()
Sets the scrollback limit.
@spec size(Raxol.Terminal.ScreenBuffer.t()) :: non_neg_integer()
Gets the total number of lines in the scrollback buffer.