Line

class Line(val width: Int)

Represents a single horizontal row of text in the terminal buffer.

Constructors

Link copied to clipboard
constructor(width: Int)

Properties

Link copied to clipboard

The pre-allocated array of character cells making up this line.

Link copied to clipboard

Distinguishes between a hard wrap or soft wrapped line

Link copied to clipboard
val width: Int

The fixed number of columns (cells) in this line.

Functions

Link copied to clipboard
fun clear()

Clears all cells in this line, resetting them to default spaces.

Link copied to clipboard
open override fun toString(): String

Returns a string representation of the characters currently in this line. Skips placeholder cells so wide characters aren't padded with extra spaces.