Use start (not end) of selection to determine soft tab spaces

This is for #3723. FYI @jeffslofish .

The original fix exposed a bug in the code. It was using end of selection (instead of start) to determine the number of spaces to insert. The bug wasn't noticed because it never inserted when there was a selection (always indented).