zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
25.01k stars 1.17k forks source link

Interference between `autosave` and `eofnewline` #1214

Open fancsali opened 6 years ago

fancsali commented 6 years ago

By enabling both the features, one could ensure, that their work won't be accidentally lost and it also looks pretty. However, enabling both of them would insert newlines randomly while typing some text, as the automatic save is triggered every 8 seconds, and if one happens to type on the end of the file, the cursor jumps to the new line automatically, and text will be magically broken into two separate line.

sergeevabc commented 4 years ago

Sorry if I’m here by mistake, but @zyedidia should know that micro, being launched as is with no configuration file present, does not add EOL after Ctrl+S is pressed. However the manual assures ```…will automatically add a newline to the end of the file if one does not exist”. That’s why I’m confused.