[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #57861] GUI editor should save text files with

From: Torsten Lilge
Subject: [Octave-bug-tracker] [bug #57861] GUI editor should save text files with an implied final newline character
Date: Sat, 22 Feb 2020 16:45:01 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15 Epiphany/605.1.15

Follow-up Comment #9, bug #57861 (project octave):

[comment #8 comment #8:]
> This isn't quite right for me yet.
> 1. When this setting is enabled, but not the setting to remove trailing
whitespace, this setting deletes all trailing whitespace on the last line of
the file.
Actually this  was intended. Is it desired to have whitespaces at the end of a
file except for this one empty newline?

> 2. This should not delete multiple newlines and spaces at the end of the
file when saving, and it should always append a newline. If I press Enter to
add a blank line in the editor, the file should end with two newlines, not
just one.
See above. What is the purpose of multiple newlines at the end of a file?
> 3. After saving, the file is reloaded in the editor, and it now shows a
blank line at the end of the file that wasn't there before. When this setting
is enabled and a file is read that ends in a newline, one final newline should
be deleted and removed before adding the text to the editor text view.
> So when saving a file, always append a single line ending, unless the buffer
is completely empty. When loading a file, always remove the last line ending,
if there is one.
When the file ends with a newline, I do not understand why this newline should
be hidden to the user by deleting it while loading? In this case, the user
might add one manually and at the end there are two. Why adding an empty line
when there is already one?


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]