change TextIndex to TextIndexHint