Ignore leading and trailing whitespaces

There is no result when there are whitespaces at
the start or the end of the selection.
Just ignore them by tripping them away.