Fix cursor not being able to move within the last line of text.