Neil:
I'm trying to add custom folding after lexing is already done and can't figure out the sequence of steps to achieve that. It seems to be possible (at least according to the documentation), but I can't figure out why the following is not working:
e:SetFoldLevel(3, e:GetFoldLevel(3) + 1 + wxstc.wxSTC_FOLDLEVELHEADERFLAG)
e:SetFoldLevel(4, e:GetFoldLevel(4) + 1)
e:SetFoldLevel(5, e:GetFoldLevel(5) + 1)
e:SetFoldLevel(6, e:GetFoldLevel(6) + 1)
I'd like to start my fold on line 3 and end on line 6. Just in case, the text I'm applying it to looks like this:
if true then
if false then
end
--#start
print '1'
print '2'
--#end
end
The folding is shown for the "if" statements (Lua lexer), but I also want to add another fold level for the lines marked by --#start and --#end. Is it possible and if so, what am I doing wrong?
Paul.