Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#2879 closed defect (fixed)

Saving a file with multine strings inserts spacing when saved

Reported by: Leonardo Laguna Owned by: Per Östlund
Priority: high Milestone: 1.9.4
Component: Frontend Version: trunk
Keywords: Cc:

Description

Take the following model and paste it in the text view.

model test "Line1
Line2"
end test;

Make small modification (touch the file) and save it and you will get

model test "Line1
   Line2"
end test;

Every time you save the model new spaces are inserted.

This affects models that have html documentation in annotations which are modified every time you save them.

Change History (6)

comment:1 by Martin Sjölund, 10 years ago

Owner: changed from somebody to Per Östlund
Status: newassigned

omc script to reproduce (list() API is bad):

loadString("model test \"Line1
Line2\"
end test;");
list();
loadString(list());
list();

comment:2 by Per Östlund, 10 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r22703. Also fixed the same issue for saveTotalModel and flattened output.

comment:3 by Per Östlund, 10 years ago

Resolution: fixed
Status: closedreopened

Actually not quite fixed yet, since I only fixed it for comments and not annotations.

comment:4 by Per Östlund, 10 years ago

Resolution: fixed
Status: reopenedclosed

Properly fixed in r22705, better implementation and also handles multiline strings in annotations.

comment:5 by Dietmar Winkler, 9 years ago

Milestone: Futurepre1.9.4

It doesn't make sense to keep closed ticket in the "Future" milestone that were simply forgotten to assign to the correct milestone in the past.

comment:6 by Martin Sjölund, 7 years ago

Milestone: pre1.9.41.9.4

Removing the pre1.9.4 milestone in favor of 1.9.4.

Note: See TracTickets for help on using tickets.