Fix restore cursor position

Forgot to count the "\n" character.
Merge pull request #69 from tdurieux/fix-cursor-position

Fix restore cursor position