Raxol.Terminal.Buffer.LineOperations.Management (Raxol v2.0.1)

View Source

Line management operations for terminal buffers. Handles line creation, retrieval, and manipulation.

Summary

Functions

Clear a line to spaces.

Create an empty line with the given width.

Create multiple empty lines.

Get a line from the buffer.

Remove lines from the top of the buffer.

Add blank lines or provided lines to the beginning of the buffer.

Set a line in the buffer.

Update a line with a function.

Functions

clear_line(buffer, y, style \\ %{})

@spec clear_line(map(), integer(), map()) :: map()

Clear a line to spaces.

create_empty_line(width, style)

@spec create_empty_line(integer(), map()) :: list()

Create an empty line with the given width.

create_empty_lines(count, width)

@spec create_empty_lines(integer(), integer()) :: list()

Create multiple empty lines.

create_empty_lines(count, width, style)

@spec create_empty_lines(integer(), integer(), map()) :: list()

get_line(buffer, y)

@spec get_line(map(), integer()) :: list()

Get a line from the buffer.

pop_top_lines(buffer, count)

@spec pop_top_lines(map(), integer()) :: {list(), map()}

Remove lines from the top of the buffer.

prepend_lines(buffer, count)

@spec prepend_lines(map(), integer()) :: map()
@spec prepend_lines(map(), list()) :: map()

Add blank lines or provided lines to the beginning of the buffer.

set_line(buffer, y, line)

@spec set_line(map(), integer(), list()) :: map()

Set a line in the buffer.

update_line(buffer, y, fun)

@spec update_line(map(), integer(), function()) :: map()

Update a line with a function.