Collapse level 1 no longer collapses just functions
-
Hi. This is a very useful feature that allowed me to see just function names and expand just those I was working on. However; I have discovered that it does not like commented out functions. It seems to get confused, leaves the commented out function unfolded and starts folding if statements for the remainder of the file.
Example (apologies for lack of indentation; it gets stripped):
static f1() {
blah;
}//static int f2() {
// blah;
//}static int f3() {
if (test) {
blah;
}
}if you collapse level 1 on that you get:
static int f1() { // folded correctly
}//static int f2() { // ignored
// blah;
//}static int f3() { // not folded but the ‘if’ inside is.
if (test) {
}
}I have probably just not noticed this behaviour before but it doesn’t seem right to me…
Any ideas?
-
Hello @Jeremy-Richemont,
afaik this is a feature which comes from the lexer (scintilla)
because when I use your code and choose python lexer it works correctly.
If C/C++ lexer is used it behaves like you reported.
Those lexers are part from the underlying scintilla component.Cheers
Claudia -
Hi Claudia. So this is something I’ll just have to live with unless someone fancies fixing the underlying component notepad++ is based on, right? Ah well. I will just have to make all my functions useful and not comment any out, then!
Cheers;
Jeremy -
Hi Jeremy,
So this is something I’ll just have to live with unless someone fancies fixing the underlying component notepad++ is based on, right?
I’m afraid, yes.
Cheers
Claudia