prevent extra cursor appearing at end of file

Reference:
https://github.com/Glavin001/atom-beautify/issues/73
Merge pull request #75 from Icehunter/patch-1

prevent extra cursor appearing at end of file