Folding is trickier than bookmarks. I'm not really sure if I'll be doing that, but, for the record, the trick would be (it seems) using
m_cbe->GetControl()->GetLineVisible(line) from ASStreamIterator and possibly
m_cbe->ToggleFoldBlockFromLine(line) to restore it.
Does anyone feel like playing around and submitting a patch?
If you want something a bit "easier" to start with, try to save the state of breakpoints
Have fun.
P.S.: Saving the state of breakpoints looks a bit more useful, but... who would decide to start a debugging session and then change the formatting before continuing debugging?
P.S. 2: I also think Morrrrrrrrrrrrrten has a good point there. There are, definitely, more important things to do right now.
P.S. 3: Next time I should try to incorporate the content of P.S.s into the post's body, so I don't have to put them at the end of it.