Fixed auto indent on paste when pasting over a selection

Fixed so it bases the indenting on the start of the selection range instead of the current cursor position.