beamtea_render (beamtea v0.1.2)
View SourceTurn a view (the full desired screen contents) into the byte stream that redraws the terminal.
beamtea 0.1.0 uses simple full-frame rendering: every frame is drawn from the top-left. To keep flicker low we do not issue a full clear each frame. Instead we home the cursor, and end every line with "erase to end of line"; a trailing "erase below" wipes any lines the previous, taller frame left behind. The net effect is a clean repaint with no visible clear.
Summary
Functions
Split a view into its constituent lines (on \n, trailing \r stripped).
Build the escape/byte sequence that repaints the screen with View. View is any iodata(); lines are separated by \n (a trailing \r is tolerated). In raw mode line breaks must be \r\n, which this inserts.
Functions
-spec lines(unicode:chardata()) -> [binary()].
Split a view into its constituent lines (on \n, trailing \r stripped).
Build the escape/byte sequence that repaints the screen with View. View is any iodata(); lines are separated by \n (a trailing \r is tolerated). In raw mode line breaks must be \r\n, which this inserts.