Ensures that SetCursorPosition is only called after the IP has been wrapped successfully.
Pasting code is now much more concise, provides a better selection rectangle at the end, and the IP automatically moves over if going east or south.