Fixup position after undo

The reason for that is that when undo is generated by XCode it can leave
us in really awkward places.

Example, go to the end of a line, type:

C<ESC>
i.<ESC>
u
<-- at this point, your cursor is on the end-of-line where it shouldn't be
since we're in normal mode.

When the undo are generated by us, this of course never happens (or would
be a bug).