Fix paste operation bug when cursor is on last line.

Fixes #195. Can't work out what the intention behind removing the last character was, but everything works fine with this change.