scratch adds newline at end of file

Bug #1075241 reported by Julien Spautz
46
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Scratch
Fix Released
Medium
Cuzzie Lee

Bug Description

Scratch always adds a newline character at the end of the file and there seems to be no way to remove this newline because it gets immediately readded.

Related branches

Changed in scratch:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → 1.2
Revision history for this message
Tristan Davies (tristan.io) wrote :

A lot of text editors do this (gedit, for example)

However, I have noticed that scratch displays trailing newlines, which many text editors do not (gedit, for example)

Revision history for this message
Arturo Torres Sánchez (r2d2.art2005) wrote :

“A lot of text editors do this”
Why? Why is this an expected behaviour?

Revision history for this message
Alex Gleason (alexgleason) wrote :

This has been driving me crazy because of the fact that Scratch also autosaves. Simply opening a file causes a new line to be added to the end of it which is immediately saved without any confirmation or indication that it's happening. Any time I open a file now I have to backspace from the bottom lines before closing it. I'd say that this makes it of "high" importance.

Revision history for this message
Cody Garver (codygarver) wrote :

There's a plugin for this in the preferences.

Changed in scratch:
status: Confirmed → Incomplete
Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

First, the plugin has side effects.
Second, this should not require a plugin.

Changed in scratch:
status: Incomplete → Confirmed
Changed in scratch:
milestone: 2.0 → 2.1
Changed in scratch:
milestone: 2.0.1 → 2.1
Changed in scratch:
assignee: nobody → Cuzzie Lee (kelwin-lee)
status: Confirmed → Fix Released
milestone: 2.1 → 2.0.1
RabbitBot (rabbitbot-a)
Changed in scratch:
status: Fix Released → Fix Committed
Changed in scratch:
status: Fix Committed → Fix Released
Changed in scratch:
status: Fix Released → In Progress
Cuzzie Lee (kelwin-lee)
Changed in scratch:
status: In Progress → Fix Committed
Changed in scratch:
status: Fix Committed → In Progress
milestone: 2.0.1 → 2.1
Changed in scratch:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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