KetraTerm
API · DevelopmentAll versions

TerminalRenderRangeCopy

class TerminalRenderRangeCopy(val maxRows: Int = 64, val maxCells: Int = 4096)

Worker-owned primitive copy of an absolute source range, reusable across reads.

Only row/cell copying occurs in the reader callback (and any session mutation lock); string assembly and analysis use cache after read returns. Each read copies at most maxRows and maxCells, except that one physical row is always permitted when wider than the cell budget. Cluster payloads copy with that row. The cache and bounds remain owned by this instance until the next read.

Constructors

Link copied to clipboard
constructor(maxRows: Int = 64, maxCells: Int = 4096)

Properties

Link copied to clipboard

Copied cells and source generations; use firstAbsoluteRow for the sliced row origin.

Link copied to clipboard

First copied absolute row, or the requested/retained intersection start for an empty read.

Link copied to clipboard

Inclusive last copied absolute row; smaller than firstAbsoluteRow for an empty read.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun read(reader: TerminalRenderFrameReader, startAbsoluteRow: Long, endAbsoluteRow: Long, checkCancelled: () -> Unit = {}): Boolean

Copies one bounded retained intersection. Returns false if no requested row remains. The reader owns synchronization; checkCancelled must be cheap and must not suspend or perform analysis while the reader's lock is held.