added autoscroll to cursor position when typing