When using "fold all" on certain code (it seems to be related to braces in comments), the code sometimes fails to fold correctly:
The test code:
class Myclass { myfunction1() { //(){ //} } // this part should be folded myfunction2() { } };
Demo:
This looks quite minor here in this reduced test case, but in certain more complicated files it makes a complete mess, making the folding feature unusable entirely for those files.
Additionally, and perhaps more seriously when repeatedly modifying the comments and folding and unfolding the code, on occasion other lines of code vanish from the display. However, they are saved in the file, and if the tab is closed and reopened, or if the code is cut and pasted, they reappear. This happened twice with the "// this part should be folded" comment vanishing while I was playing with the commented braces above, but I have since not been able to reproduce the effect even by repeating the exact changes from my edit history; there's possibly an overflow somewhere causing this effect.
That code didn't paste correctly; it should be:
Can you reproduce the same problem in scite?
If you can please report this problem to the scintilla project and the give us the ticket number. If you cannot then we will have to see what is going on inside the cb's codebase.
Yes you're right, it does occur in Scite. Bug reported here: https://sourceforge.net/p/scintilla/bugs/1676/
They say it's uh, intended behaviour. https://sourceforge.net/p/scintilla/bugs/1676/
I would suggest adding a menu option to toggle this behaviour in codeblocks.
I still haven't been able to reproduce the disappearing line bug but it seems that may be unrelated in that case.
Ok, I'll assign this bug to myself and I'll see if I can find some time in the future to fix it. Until then patches welcome. It should be trivial to add.