ExtendedSelection: fix bug with last character of block