Fixes #60 enter doesn't work at the end of a file