This enables cursor wraparound while dragging in Browse mode in horizontal direction too. It uses similar code like vertical wraparound.
Additionally it corrects a missing offset in the offset correction. Cursor wrapping has a margin, which was not considered in offset correction.