Ensure cursor always stays in view.