ExTermbox.Buffer (ExTermbox v1.1.3)

View Source

Handles buffering of incoming data chunks from the Unix Domain Socket. Extracts complete lines terminated by newline characters.

Summary

Functions

Processes an incoming data chunk, appending it to the buffer and extracting lines.

Functions

process(buffer, data_chunk)

Processes an incoming data chunk, appending it to the buffer and extracting lines.

Returns {:lines, lines, remaining_buffer} or {:incomplete, buffer} where lines is a list of complete, trimmed lines found in the combined buffer, and remaining_buffer / buffer is the content after the last newline or the entire buffer if no newline was found.