Editor tabs save all bug lazarus / 9-Editor ---------------------------------------------------------------------- hinst · 2014-04-30 10:39 When I switch tab in Lazarus code editor, Save All button becomes active even if I don't change any code. Why is that? I sense a bug here ---------------------------------------------------------------------- zeljko · 2014-04-30 10:46 No, this is not bug. What if you open lazarus and then click eg. tab 5 to be default activepage next time you open your project. How you will save that (if there's no any other change in project) ? ---------------------------------------------------------------------- Martin_fr · 2014-04-30 10:49 No that is intended. The active tab is stored in the session, therefore changing it modifies the session. "Save All" includes changing the session. However there are issues what all changes the session and what not. For example, the caret pos is also part of the session (and folding, can be configured to be part of it) Yet if the only thing you do, is click in an editor, and thereby move the caret, then the session will not be marked as modified, even though the caret is changed, and even though that if you make another change (like switching tabs) the changed caret pos will be saved. The problem is that the caret is changed to easily, just click an editor to focus it, may already change it. There is no perfect solution to that. Some people want the session to be marked on more actions, other want less. What is a bug (not sure if reported, may be),  is that changing a fold does currently not mark the session as change (if config for fold in session is on). Changing fold is not an accidental action. ---------------------------------------------------------------------- hinst · 2014-04-30 11:00 Quote from: Martin_fr on April 30, 2014, 12:49:01 pm"Save All" includes changing the session. Seriously? I always thought that it should (supposed to & expected to) indicate only changes in project sources ---------------------------------------------------------------------- Martin_fr · 2014-04-30 11:07 How then would you indicate changes to the session? Btw, there is an option, that will make the IDE ask before saving session changes. If active, then when you change tab, and close the project, the IDE will ask "Save session changes for project foo?" I could imagine, that an option to ignore session changes, unless there are edited sources, lfm, or similar (that is ignore session changes if project was only viewed), would be acceptable too. Such an option would mean, that all those session changes would be discarded, if no other changes exist. And if they are not saved, then the "save all" would not be needed to be enabled either. However such a request, may depend on a volunteer te implement it.