Resolves #50 - Sorting affects one line too much

The end of the selection is only expanded to another full line if it is not at the beginning of the line. This behaviour is consistent with the commenting/uncommenting or indenting/unindenting of a selection.
Oops, you have spaces for tabs... Fixed code formatting
Merge pull request #52 from dg9ngf/master

Fix for issue #50, sorting one line too much