Boy, this is like 30% bug report and 70% feature request. The feature request is to give DrPython some kind of session file knowledge so when a file (loaded from a session) is saved, it will automatically (or perhaps prompt) to save a new session file.
The bug report is that if you save a change to the py which modify's the folding state hierarchy, then later close and try to reload the session file, two things happen.
1) You get the something went wrong message - this is fine.
2) It loads the py but the file is broken - this is not okay.
As for 2, I'd say it should either load nothing at all (ie close the aborted loading) or load the file cleanly with no state (or some state if possible).
For instance, I added an:
if foo:
bar
else:
blah
in the middle of a bunch of other foldings in a file. Upon trying to open this modified py with the old dsf, the file is broken such that I see this:
[+ means expand, - means collapse, _ means block end tick mark]
...
650
651 - if foo:
652 _ bar
752 _ break
753 break
754 _
...
Anyway, the point is that lines 653 - 751 are missing and there is no expander to make them show up.
Let me know if you need me to pear down my py and dsf files to a small test-case.
Logged In: YES
user_id=796750
I will try to fix this before I go on break.
I can see two things:
One, an option to prompt for save/autosave, or do nothing
if a file specified in a session is modified.
Two, noting this in the documentation.
Three, checking to make sure the file has the same number of
lines when opened from a session as when the olding states
where recorded, and if so, do not load the folding state,
and inform the user.
Logged In: YES
user_id=796750
Fixed in 2.3.3 (CVS).