Status of folding save/restore?

32 views
Skip to first unread message

daspo...@googlemail.com

unread,
Sep 22, 2009, 8:00:27 AM9/22/09
to scintilla...@googlegroups.com
hi,

over at the geany mailing list we discussed the issue
of remembering folding status for recent files [1].

since this is also mentioned on www.scintilla.org/Future.html
in section "View state save/restore", one suggestion was to
check with you guys how the chances are for this one?

we also talked about a geany-specific solution and thought
that validating that the file hasn't changed, as mentioned in
www.scintilla.org/Future.html would be over the top. instead,
we thought of simply storing a list of line numbers for each
recent file, each of which representing a folded-up folding
point. if any line number was found at which there is no
possible folding point, take this as sign of corruption and
discard/clear the folding information for that file.
maybe such an approach would make the feature a bit more likely?
but you also talk about different views having different folds.
a quick and simple approach would be to save only one view (e.g. the last
having been closed) and load a file with that folding info.

best, matt

[1] http://lists.uvena.de/geany/2009-September/005071.html
and follow-ups

Neil Hodgson

unread,
Sep 22, 2009, 8:32:14 AM9/22/09
to scintilla...@googlegroups.com
daspostloch:

> since this is also mentioned on www.scintilla.org/Future.html
> in section "View state save/restore", one suggestion was to
> check with you guys how the chances are for this one?

There is code in SciTE in the FoldState class in
scite/src/SciTEBase.h for storing folding of buffers that aren't
shown. There is also code in scite/src/SciTEBuffers.cxx for saving and
loading this from file: search for "session.folds". SciTE only allows
a single view on a file.

Neil

Reply all
Reply to author
Forward
0 new messages