Fixes for #21

This commit fixes some odd behavior when navigating using the arrow keys
when a mark is set and in addition fixes the behavior when cancelling
a set mark. Instead of jumping back to the begining of the old selection
now, the cursor is placed where the mark is cancelled.