Fix a bug where scrollToLine was erroring because of an incorrect line index.