[Geany-devel] Folding problem

WILLIAM FRASER william.fraser at xxxxx
Thu Dec 16 22:04:31 UTC 2010

First off, a big thanks to Lex Trotman and Frank Lanitz. I've now fixed the
help, and settings problems in my plugin, and I think that I've figured out
what the problem is when I try to implement remembering of fold states.

When I watch what happens in my ln_document_open function (which is called
when the "document-open" callback is activated in the plugin on opening a
file), as I iterate through the lines for some reason the
SC_FOLDLEVELHEADERFLAG flag is not set for any lines including lines where
there should be folds. I use
scintilla_send_message(sci,SCI_GETFOLDLEVEL,iLineNumber,0) to get the fold
level. For some reason, if there is a call to dialogs_show_msgbox in the
document-open callback function, then SC_FOLDLEVELHEADERFLAG is set

Is this a bug? Or does the editor not normally set fold flags until later,
and the dialogs_show_msgbox simply forces scintilla to display (and so set
fold flags) earlier than it normally would? If so, is there a function I can
call that will do this without having to display a message box, or is there
another way to activate my code after the fold flags have been calculated?

William Fraser
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20101216/2f8140e7/attachment.html>

More information about the Devel mailing list