Improving the displacement of the text when the cursor moves to the right