Setting the already chosen line ending creates false warning that the file is changed and needs to be re-saved
Setting the already chosen line ending creates false warning that the file is changed and needs to be re-saved.
When you open a text file in Mousepad and want to check the file ending, you can go to Menu Bar -> Document -> Line Ending and see a bullet already filled in. On the given file, one sees the Unix (LF)
bullet filled in. To make sure that every EOL/line ending is LF
, you may want to just click on it again. Maybe you click on it accidentally.
Now Mousepad's titlebar shows an asterisk *
after the filename and Mousepad will prompt the user to re-save the file before exiting. Apparently, Mousepad erroneously believes the file has changed.
This way of doing things will make the user erroneously think that the file was not fully using Unix (LF) for the EOL/line ending at the end of every line.
The user will think "Oh, wow, it is a good thing I checked, because this file was actually a mix of line endings! Good thing I checked, made the line endings all the same, and then re-saved the file. Hm, I wonder how many more files on my computer have bad mixes of different line endings that I also need to check ...."
But in actuality, the file had been 100% in Unix (LF)
the entire time. The user erroneously thought that he or she changed something, that he or she corrected a mistake in the text file. However, the file never changed and was 100% fine the whole time.
I tested this with hexdump -C
. The binary file was exactly the same before and after my experiment.
SUGGESTION:
Make Mousepad not erroneously think the file has been changed when someone (re-)selects the already implemented file ending. This would make Mousepad behave as it should.
At the moment, Mousepad does behave correctly in the following situations:
- If I hit a key while looking at a file and hit
CTRL
+Z
, then the file goes back to how it was and Mousepad correctly knows that there are no changes. Mousepad does not prompt me to save the file on exit. - If I have an empty file, open it, navigate to the very first position, and hit
BACKSPACE
, then nothing happens and Mousepad correctly knows that there are no changes. Mousepad does not prompt me to save the file on exit.