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 698715 - trailing new line not counted in document statistics
trailing new line not counted in document statistics
Status: RESOLVED OBSOLETE
Product: gedit
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks: 625955
 
 
Reported: 2013-04-24 09:18 UTC by Ulf Zibis
Modified: 2016-11-26 20:05 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ulf Zibis 2013-04-24 09:18:41 UTC
On 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!
Here is the corrupted file:
https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/1122424/+attachment/3524483/+files/grubenv
Comment 1 Ignacio Casal Quinteiro (nacho) 2013-04-24 09:24:46 UTC
That's a feature, if you do not like it feel free to disable it, see:
https://git.gnome.org/browse/gedit/tree/data/org.gnome.gedit.gschema.xml.in.in#n144
Comment 2 Ulf Zibis 2013-04-24 10:16:35 UTC
(In reply to comment #1)
> That's a feature, if you do not like it feel free to disable it, see:
> https://git.gnome.org/browse/gedit/tree/data/org.gnome.gedit.gschema.xml.in.in#n144

I don't find any config file for gedit in /etc/...
Can you help me?
Comment 3 Ignacio Casal Quinteiro (nacho) 2013-04-24 10:19:05 UTC
To change this option you should use dconf-editor, go to the setting and change it.
Comment 4 Ulf Zibis 2013-04-24 10:27:38 UTC
When gedit automatically adds a trailing newline to a file, which originally hadn't one, it's hard to see that for the user, so please show an empty line at the end, if there is a new line.

... and if user deletes that trailing newline manually, it should stay deleted, even if ensure-trailing-newline is set.

... and at least, gedit document statistics should display correct values (see comment 0).
Comment 5 Ulf Zibis 2013-04-24 10:34:21 UTC
...and it would be nice, to find some hint about dconf-editor in gedit's help
section "config gedit".
Comment 6 Ignacio Casal Quinteiro (nacho) 2013-04-24 10:38:11 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.

See the comments in the other bug report.

*** This bug has been marked as a duplicate of bug 625955 ***
Comment 7 Ulf Zibis 2013-04-24 11:40:41 UTC
Removed dupe, as wrong statistics data is not part of bug 625955
Comment 8 Ulf Zibis 2013-04-24 13:11:10 UTC
Please also check correct "Number of lines" data in document statistics.
Comment 9 Kevin Hagner 2016-11-26 20:05:33 UTC
Thanks for taking the time to report this.
However, you are using a version that is too old and not supported anymore by GNOME developers. GNOME developers are no longer working on that version, so unfortunately there will not be any bug fixes by GNOME developers for the version that you use. In Gedit 3.22, trailing new line is not automatically added any more and is visible.

By upgrading to a newer version of GNOME you could receive bug fixes and new functionality. You may need to upgrade your Linux distribution to obtain a newer version of GNOME.

Please feel free to reopen this bug report if the problem still occurs with a recent version of GNOME, or feel free to report this bug in the bug tracking system of your Linux distribution if your distribution still supports the version that you are using.