After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 658890 - gedit adds an empty last line
gedit adds an empty last line
Status: RESOLVED DUPLICATE of bug 658891
Product: gedit
Classification: Applications
Component: general
3.1.x
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2011-09-13 08:59 UTC by Jean-Philippe Fleury
Modified: 2011-09-13 09:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jean-Philippe Fleury 2011-09-13 08:59:48 UTC
1) In gedit, create a new document, for example with 5 lines:

a
b
c
d
e

2) Save this document (for example "test.txt") and close it.

Actual result: the document size should be 9 bytes, but it's 10 bytes:

$ stat -c %s test.txt
10
$ cat test.txt 
a
b
c
d
e
$

See the newline displayed by `cat` after the character "e".

Expected result:

$ stat -c %s test.txt
9
$ cat test.txt 
a
b
c
d
e$

Note that I obtain the expected result when I do these steps with the editors Geany and Leafpad.
Comment 1 Jean-Philippe Fleury 2011-09-13 09:07:29 UTC
May be related to bug 658891
Comment 2 Ignacio Casal Quinteiro (nacho) 2011-09-13 09:28:06 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 658891 ***