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 165092 - Trailing newlines in text elements are discarded
Trailing newlines in text elements are discarded
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: general
0.94
Other All
: Normal minor
: 0.95
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2005-01-24 13:16 UTC by Hendrik Fuß
Modified: 2006-01-28 00:13 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Hendrik Fuß 2005-01-24 13:16:07 UTC
Please describe the problem:
When a diagram is saved and reloaded, newlines at the end of text elements are
not restored correctly. This corrupts the layout when working with flowcharts or
similar.

Steps to reproduce:
1. New diagram
2. Create a text element
3. Enter "Test" followed by a newline
4. Save the Diagram
5. Close and reload it


Actual results:
The newline is gone, the text element consists of only one line

Expected results:
There should be two lines of text

Does this happen every time?
yes, reproducibly

Other information:
Comment 1 Lars Clausen 2005-02-01 20:39:42 UTC
That is indeed the case.  Probably has to do with the way we read strings, as
the newline does turn up in the saved file.  It seems to lose a single newline
every time.  No obvious fix, but if you add a space after the last newline, it
doesn't disappear.
Comment 2 Tom Kast 2005-04-07 03:42:06 UTC
Want me to take this one?  Or is there another higher on your list that you
would like me to chase?
Comment 3 Lars Clausen 2005-04-07 05:32:27 UTC
Could you try a look at 123225 first?  If it's not reproducible, then sure, go
for this.
Comment 4 Hans Breuer 2006-01-28 00:13:34 UTC
2006-01-28  Hans Breuer  <hans@breuer.org>

	* lib/text.c(set_string) : don't eat the trailing new-line
	Fixes bug #165092