Fix off-by-one error in text line break code (#1122)