a buggy first try at TextPiece::selectTowards

Just wanted to archive the commit without cluttering up the branches list, by using https://github.com/blog/1335-tidying-up-after-pull-requests