Skip to main content

Module wrap

Module wrap 

Source
Expand description

Breaking long lines into the screen rows that show them, for a frontend that lays out text itself.

Structs§

Row
One screen row: the document line it belongs to, and the range of that line’s characters it shows.

Functions§

locate
Finds the row holding a caret at column of line, and how far into that row it sits.
rows
Lays out lines into the rows that show them, breaking anything wider than width at the last space that fits, or mid-word for a word too long to ever fit.
visible_end
The column just past the last visible character of row within line.