Forum > Editor

[SOLVED] Lazarus is not saving my code editor tab layout

(1/2) > >>

Specifics: Lazarus V2.0.12 win32 on Win 10.

I have been starting out in Lazarus but I have an ongoing problem with Lazarus not saving the tab layout in the source editor for a project (i.e. the arrangement of units I have open in different tabs).

When I close Lazarus and re-open the project, I see the source editor window with no tabs open, and I have to go and open each unit one by one and try to figure out where I left off.  I have to do this every single time I start Lazarus.

Any idea what is wrong with my setup?

Halo QuinnMartin,
Welcome to the forum.

Maybe there is something wrong with your installation, you may need to reinstall your Lazarus. But I believe your issue happened because you did not enable auto save active desktop:

Lazarus main menu > Tools > Desktops > enable: Auto save active desktop

Desktops is a very useful feature in Lazarus IDE. You can learn more here:,59724.msg445557.html#msg445557

If you mean the tabs with the filenames: unit1, unit2, forms, classes, ....

Check under menu: Project > Project Options
then the tab: Project Options > Session

- Enable "save editor info for closed fiels
- Disable "save editor info only for project files"

And ensure you have one of the 3 upper radio buttons selected, so session info is saved.
Recommended: "Save in lps file in project directory" => then you can check the date/time of that file.

Also, maybe check, if files belong to the project. That is if the project inspector lists all your files, well all those that you think belong to the project.


--- Quote ---enable: Auto save active desktop
--- End quote ---

I checked and this is enabled.

--- Quote ---- Enable "save editor info for closed files
- Disable "save editor info only for project files"
- Save in lps file in project directory

--- End quote ---

Yes, I checked and my project is set up exactly as described with all 3 of those recommendations.

So I open a few tabs in Source Editor, Save All, Close All.  Then open the project .lpi file again.  None of the tabs appear, I just get the Project Inspector with the files and units, but the Source Editor does not appear and if I enable it there are no tabs open.

I do notice some weird behavior after using the Close All command.  It still has my project open in Project Inspector with all the files and units listed.  I would expect that list to be cleared.

Really confused by all of this and am wondering if the session functionality is bugged.


--- Quote ---Close All
--- End quote ---

There we go, that is why.

"Close All" => closes all editor files (aka tabs). It is in the "File" menu. It does not close the project. So when you then quit the IDE, it saves the session of your project with all files closed.

There is a "Close project" in the project menu.
It will however ask you to open/create a new project before you can do anything.

The Lazarus IDE does always have a project open. It can't work without.


[0] Message Index

[#] Next page

Go to full version