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 626739 - gedit adds random lines when saving in Windows mode
gedit adds random lines when saving in Windows mode
Status: RESOLVED FIXED
Product: gedit
Classification: Applications
Component: general
2.30.x
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2010-08-12 14:56 UTC by Pedro Villavicencio
Modified: 2010-10-30 11:36 UTC
See Also:
GNOME target: ---
GNOME version: 2.29/2.30


Attachments
Minimal test case (8.00 KB, application/octet-stream)
2010-09-01 07:50 UTC, Louis Simard
Details

Description Pedro Villavicencio 2010-08-12 14:56:53 UTC
this report has been filed here:

https://bugs.edge.launchpad.net/ubuntu/+source/gedit/+bug/616441

"The four attached files were generated like this.
Open rom_bourg16_rew.txt with gedit, "save as" rom_bourg16_rew2.txt with Windows-style line returns.
Close the file. open rom_bourg16_rew2.txt , save it as rom_bourg16_rew3.txt
Close, open rom_bourg16_rew3.txt, save it as rom_bourg16_rew4.txt

Every time it saves, gedit adds new lines at random places. The three last files should be the same."

files:

https://bugs.edge.launchpad.net/ubuntu/+source/gedit/+bug/616441/+attachment/1485013/+files/bug_gedit.zip
Comment 1 Louis Simard 2010-09-01 07:50:02 UTC
Created attachment 169215 [details]
Minimal test case

Opening the file creates one additional newline if the Carriage Return/Line Feed combination (CR LF) is both ways from a 8192-byte page. The file is saved with this additional newline.

See the attached file (its MIME type is application/octet-stream, just in case!), which serves as a test case for this bug. In a hex editor, it's 8191 'a', then CR LF, then 1 'a'. In gedit, this makes 2 newlines.

Using gedit 2.30.3.
Comment 2 jessevdk@gmail.com 2010-10-30 11:36:36 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.