GNOME Bugzilla – Bug 165092
Trailing newlines in text elements are discarded
Last modified: 2006-01-28 00:13:34 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:
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.
Want me to take this one? Or is there another higher on your list that you would like me to chase?
Could you try a look at 123225 first? If it's not reproducible, then sure, go for this.
2006-01-28 Hans Breuer <hans@breuer.org> * lib/text.c(set_string) : don't eat the trailing new-line Fixes bug #165092