Closed
Description
Describe the problem
The autoformat feature removes the last line's new-line, disturbs all sorts of diff / git tools.
Quoting the C++ standard: A source file that is not empty and that does not end in a new-line character, or that ends in a splice, shall be processed as if an additional new-line character were appended to the file.
Could this be changed to leave the new-line in place, or maybe even add one if it is missing?
Thanks!
To reproduce
Press CMD-T and save. Look at the last character in the sketch file.
Expected behavior
Leave the new-line before EOF in place.
Arduino IDE version
2.0-nightly-202209
Operating system
macOS
Operating system version
12.6
Additional context
No response
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest nightly build
- My report contains all necessary details