writeChunk method
Writes text to the buffer at the current write position, returning the number of cells written.
Implementation
int writeChunk(String text, Color fg, Color bg, int attributes) {
_checkNotDisposed();
_utf8Scratch.update(text);
final written = _bindings.textBufferWriteUtf8Chunk(
_ptr,
_utf8Scratch.pointer,
_utf8Scratch.length,
fg,
bg,
attributes,
);
return written;
}