Fix issue where terminal cursor didn't wrap to the previous line when backspacing