cpp lexer folding in scintilla always seemed bizarre to me and I tried to implement folding algorithm similar to that of akelpad or editplus. https://sourceforge.net/tracker/?func=detail&aid=2986054&group_id=2439&atid=352439 What do you think?