[[ Bug 12823 ]] Take segment offset into account when drawing selection