Fix navigating cursor in long texts