Folded code doesn't maintain. lazarus / 9-Editor ---------------------------------------------------------------------- Edson · 2013-08-18 15:18 Hi, I don't know if it is something about my configuration, but when I use the IDE, I use to fold (hide) many parts of the code (40 o more), and it's OK while no close the IDE. If I do, only some parts of the code keep folded. I'm uising Lazarus 1.0.8 - FPC 2.6.2 - i386 -Win32. Greettings ---------------------------------------------------------------------- Martin_fr · 2013-08-18 16:24 There are different "types" of folding: - fold at pascal keywords (begin, try, case, var, ..., comments (*, {, //, {$IFdef, {%reginon ) --- Keywords, that are *NOT* in a comment:  Those should remain folded, even if you restart the IDE.   However, if the file is modified outside the IDE, folds can be lasot, because they are no longer at the expected positions. --- Keywords, that are  in a comment: Code: [Select]  (*     if a = b then begin       inc(a);    end;  *) If such a block was folded, and then put into a comment, then it will *not* remain folded - fold of the current selected text: This is *not* saved. ---------------------------------------------------------------------- Martin_fr · 2013-08-18 16:30 also there is: Menu > project > project options > Page: "Session": "Save fold info": that should be checked "Save Editor info only fol project files" which I have not tested, but, if not checked, then there is a possibility that files that are not part of the project (packages, LCL, ... see "project inspector") will *NOT* save fold info [ same for "closed files" ] ------------------ In tools > options > editor > folding, you can set wich keywords should offer folding. BUt that is not related to this issue ---------------------------------------------------------------------- Edson · 2013-08-18 17:00 I have checked "Menu > project > project options > Page: "Session" and "Save fold info": is activated. It's true because many of the folded codes maintain after reopen the IDE. But many of the other NO.  It's like if it would have some limit for the quantity of folded blocks saved. I fold entire procedures and functions. Thanks. ---------------------------------------------------------------------- Martin_fr · 2013-08-18 17:15 so, in the same file, some folds are saved, some not? Can you give steps to reproduce? ---------------------------------------------------------------------- Edson · 2013-08-18 17:42 They are on two units. The fact is when i fold some procedures in Unit1, it's OK after reopen de IDE. But some folds in Unit2, are lost. When I fold Ok the Unit2, and reopen, some fold of the Unit1, are lost. ---------------------------------------------------------------------- Martin_fr · 2013-08-18 17:57 Under menu Tools > Option > Environment/Desktop: Set "Ask before saving project session" so you will note, if your changes where saved (if you edited a file (changed text) then it asks anyway. If you do not edit the file, but only change a fold, it may not detect that the session changed. However, if you switch tabs, it should always detect it. Also, detecting if the session changed is all-or-nothing, so either all fold changes in all units, or none at all. If you whish, you can sent me a copy of the project, and instructions what to do. lazarus # mfriebe.de