Skip to main content

Module buffer

Module buffer 

Source
Expand description

The buffer: rows, marks, lazy layout, trim.

Owns the message list, the HeightIndex that shadows it, and the ScrollAnchor. This is the object the view drives.

The API mirrors what rotulus.h exposes to C — append, insert-before-a-mark, replace, remove-a-mark, clear, trim — so the widget’s FFI layer is a translation rather than a redesign. A mark is a MessageId, not a pointer into a linked list, so a stale one is inert rather than dangling.

Structs§

ChatBuffer
A scrollable list of laid-out messages.

Constants§

DEFAULT_GROUP_GAP_SECS
Default gap that breaks a run of messages from one speaker.
MIN_INDENT
Floor for a hand-dragged gutter, so it can’t be collapsed to nothing and become impossible to grab again.