Don't print trailing characters when out of space
Fix off-by-one in terminal_addch when conforming to margins