Autoscroll when selecting the entire line

Closes #4032