Fixed bug where newlines are ignored when pasting text.