[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: Mike Miller
Subject: [Octave-bug-tracker] [bug #57861] GUI editor should save text files with an implied final newline character
Date: Sat, 22 Feb 2020 17:12:35 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36

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

To me this is just how a text editor should work. Here's a practical
walkthrough with the GNOME gedit editor, and I get the same behavior with
emacs or vim.

If I open a new empty buffer and click Save and give it a name, I get a zero
byte empty file.

If I type a single character, let's say 'a', and click Save, I get a two byte
file, an 'a' followed by a newline.

If I hit Enter after the 'a' and click Save, I get a three byte file, an 'a'
followed by two newlines.

If I select all text with Ctrl+A, delete everything, then press Enter once and
click Save, I get a two byte file, two newlines.

The best way I can describe this is if the buffer is empty, an empty file
should be written. Otherwise, the contents of the text area should have a
newline appended and written to the file.

When a file is loaded into the editor, if the file ends in a newline, the
newline should be chopped off before populating the text into the editor text


Reply to this item at:


  Message sent via Savannah

reply via email to

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