When we create a file in the editor, it always comes with an extra empty line at the end, even when we don't want it. This leads to problems when we want to control precisely the behavior of a file (e.g., Python exercices for files), so that we reproduce on PL what we have on our own machine.
How to reproduce
Create an empty file in the editor, it should be automatically opened, and we already see that it contains two empty lines.
Delete one of the lines, save the file, and close it.
Reopen the file.
Expected behavior
The file should contain only one empty line (completely empty file).
Actual behavior
The file now contains two empty lines (so one '\n').
Description
When we create a file in the editor, it always comes with an extra empty line at the end, even when we don't want it. This leads to problems when we want to control precisely the behavior of a file (e.g., Python exercices for files), so that we reproduce on PL what we have on our own machine.
How to reproduce
Expected behavior
The file should contain only one empty line (completely empty file).
Actual behavior
The file now contains two empty lines (so one '\n').