Fix highlight application when start offset > 0.
Selected index should be less than end index, since it's exclusive.