Fix #268: 'last insert mark' at file end exception

Normally the 'last insert mark' is moved one position to the right to
fix a one-off case. This triggered an exception when at the end of the
document, in that case just store our current position unmodified.