I tried setting the cursor position after the ranges were added but it didn't have the same effect. I think this is because the ranges are actually selected, so pressing the left key will actually jump to the start of the selection (which might be much further away from where the cursor was).