move cursor correctly from right to left over equation