Trim trailing whitespaces in selection.