GNOME Bugzilla – Bug 698715
trailing new line not counted in document statistics
Last modified: 2016-11-26 20:05:33 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
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
(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?
To change this option you should use dconf-editor, go to the setting and change it.
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).
...and it would be nice, to find some hint about dconf-editor in gedit's help section "config gedit".
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 ***
Removed dupe, as wrong statistics data is not part of bug 625955
Please also check correct "Number of lines" data in document statistics.
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.