gedit shows wrong document statistics

Bug #1122424 reported by UlfZibis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gedit
Expired
Medium
gedit (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Ubuntu 12.10

- open file manager as root via "sudo nautilus"
- display properties of "/boot/grub/grubenv"
--> file size: 1.024 Bytes
- open file via double-click
- in gedit change 1 letter and save
- in gedit view document statistics
--> file size: 1.024 Bytes
- display properties again in nautilus
--> file size: 1.025 Bytes

This is strange I think!

Revision history for this message
UlfZibis (ulf-zibis) wrote :
Robert Roth (evfool)
affects: brasero (Ubuntu) → gedit (Ubuntu)
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue you are reporting is an upstream one and it would be nice if somebody having it could send the bug to the developers of the software by following the instructions at https://wiki.ubuntu.com/Bugs/Upstream/GNOME. If you have done so, please tell us the number of the upstream bug (or the link), so we can add a bugwatch that will inform us about its status. Thanks in advance.

Changed in gedit (Ubuntu):
importance: Undecided → Low
Revision history for this message
Ma Hsiao-chun (mahsiaochun) wrote :

Just 1 byte more, I guess it is because gedit adds a newline in the end of file.

Changed in gedit (Ubuntu):
status: New → Incomplete
Revision history for this message
UlfZibis (ulf-zibis) wrote :

I'm not sure, what you think is incomplete here?
Yes, gedit adds an additional newline, even if user doesn't want it, so this is a bug.
In case of file grubenv, it corrupts the file from being usable, as it should not have a newline at the end.

UlfZibis (ulf-zibis)
Changed in gedit (Ubuntu):
status: Incomplete → Confirmed
Changed in gedit:
importance: Unknown → Medium
status: Unknown → Invalid
Revision history for this message
UlfZibis (ulf-zibis) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

upstream stated it's not a bug but a feature

you can change the behaviour with:
$ gsettings set org.gnome.gedit.preferences.editor ensure-trailing-newline false

Changed in gedit (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
UlfZibis (ulf-zibis) wrote :

upstream bug is again a bug.
gedit still shows wrong document statistics.

Changed in gedit (Ubuntu):
status: Invalid → New
summary: - gedit saves 1 byte to much
+ gedit shows wrong document statistics
Changed in gedit (Ubuntu):
status: New → Triaged
Changed in gedit:
status: Invalid → New
Changed in gedit:
status: New → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.