Don't move cursor back for paste on empty line.

If the cursor would move back, we could get stuck in a newline combo,
causing Eclipse to barf.

Fixes #505.
Write tests for insert line, paste on empty line.