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

Copy Markdown 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.

Splits a list of rows for IL/DL at y: the rows above it, the region from y to bottom (clamped to the rows there are, so a region set for a taller screen cannot grow the list) and the rows below, with count clamped to the region's height.

Update a line with a function.

Functions

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

Clear a line to spaces.

create_empty_line(width, style)

Create an empty line with the given width.

create_empty_lines(count, width)

Create multiple empty lines.

create_empty_lines(count, width, style)

get_line(buffer, y)

Get a line from the buffer.

pop_top_lines(buffer, count)

Remove lines from the top of the buffer.

prepend_lines(buffer, count)

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

set_line(buffer, y, line)

Set a line in the buffer.

split_region(cells, y, count, bottom)

@spec split_region(list(), non_neg_integer(), non_neg_integer(), integer()) ::
  {list(), list(), list(), non_neg_integer()}

Splits a list of rows for IL/DL at y: the rows above it, the region from y to bottom (clamped to the rows there are, so a region set for a taller screen cannot grow the list) and the rows below, with count clamped to the region's height.

update_line(buffer, y, fun)

Update a line with a function.