Move cursor to end when navigating history

Fixes #244

Sorry, forgot to create the pull request m(