Move cursor accordingly.