wxMaxima-developers / wxmaxima

A gui for the computer algebra system Maxima built with wxWidgets
https://wxMaxima-developers.github.io/wxmaxima/
Other
459 stars 96 forks source link

Truncated lines when writing .wxm files - possibly and effect of cut and paste #1908

Closed MSoegtropIMC closed 2 months ago

MSoegtropIMC commented 2 months ago

I am using wxMaxima 24.02.2 on Windows.

When editing a .wxm file and saving it, I frequently see that individual lines are truncated in the saved file.

E.g. I had in the .wxm file:

/* [wxMaxima: input   start ] */
f_Helium
/* [wxMaxima: input   end   ] */

instead of

/* [wxMaxima: input   start ] */
f_Helium: 3;
/* [wxMaxima: input   end   ] */

When I save the still open edited file as .wxmx, close it, open the .wxmx file and save it as .wxm again, the .wxm file is fine. Luckily I didn't have data loss as yet because I usually batchload .wxm files after saving them, so I see this quickly and then do the .wxmx detour.

I cannot give a reproduction sequence, but it happened to me at least 5 times in one hour of editing .wxm files. Usually this leads to syntax errors when loading the .wxm file with batchload, so this is easy to test (edit, save and batchload from other window). I guess it takes some copy or cust and pasting to see this.

I btw. also saw issues that when I cut a subsection title and paste it somewhere else, that it is truncated - I have seen just the first character and the first word of the headline. But input fields look correct after cut/paste, they just save wrong and this only in .wxm files - .wxmx files are fine. This happened to me reproducible with one specific sub section title, but never with something else. After save/reload the issue was gone.

MSoegtropIMC commented 2 months ago

Thanks for the fast fixing!