Maintain cursor position when exchanging

Closes #16.