Join statements
Don't draw if there's no buffer
Viewports now have their own colors
Function to fit a string to a width
Better code to draw a buffer's line
Fix how the bg of a viewport is painted
Data type for representing screen state

A screen instance contains its viewports,
and knows how to draw itself, possibly by
delegating drawing to its viewports.
Adapt main to the latest changes