The line where the cursor located is always displayed at the bottom and
old content scrolls up until disappearing eventually at the top of the
screen.
This is implemented using a ring buffer of all rows, where old chars
are only overwritten when writing new ones. To avoid displaying stale
data at the end of rows, we save the length of every row and hide chars
that were not overwritten (yet).