fix cursor positioning when at the end of a line (#20)
fix cursor positioning when at the end of a line (#20)

This change makes liner properly calculate the line the cursor should
be on. It also moves the cursor down a line when the end of a line is
reached while typing.

Fixes #19.
MovingtoMars/liner