buffer_toscreen() handles all buffer -> screen coord'ing
Pull out buffer linewrap calculation
Cursor limits/scrolling take wrapped lines into account
Check begin != NULL before entering linewrap
Clear the line after wrap - prevent scrolls leaving artefacts
Handle cursor movement down after a wrapped line

If this happens we need to count the wrapped line's line-increment, and
use it to apply the limit correctly in ui_cur_changed()
Prevent buffer drawing encroaching into the command line