draw the cursor in the right place when scrolling