prevent extra cursor appearing at end of file

Reference:
https://github.com/Glavin001/atom-beautify/issues/73