Preserve cursor position after exchange