retain selection when scrolling

Fixed overwriting the text when scrolling while in the middle of a
selection
Merge pull request #749 from sidschingis/patch-5

retain selection when scrolling