Optimize line update, avoiding outputting characters already on-screen (aka what curses does, but this is portable to even windows, so no curses. Anway, should be under 20 line function.) Make layout take region width into account.