Don't trim unread lines

Also fix read marker after trimming
Merge pull request #344 from glowing-bear/fixlinetrimming

Don't trim unread lines