improved auto cursor move