You should read the change log more carefully ...
The folding that you are seeing are called 'Compact' which means: "dont stop folding at whitespace and fold as much as you can"
To enable/disable it, (and this is what I have implemented) -> Settings -> Editor -> Folding
There you will also find the other feature u have requested
Eran
[BUG] Incorrect Folding Marking in C files
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: [BUG] Incorrect Folding Marking in C files
Make sure you have read the HOW TO POST thread
-
- CodeLite Expert
- Posts: 113
- Joined: Fri Jul 11, 2008 9:12 am
- Contact:
Re: [BUG] Incorrect Folding Marking in C files
Really Sorry. Just found it and felt very happy. Un-knowing i had chcecked fold compact.eranif wrote:You should read the change log more carefully ...
The folding that you are seeing are called 'Compact' which means: "dont stop folding at whitespace and fold as much as you can"
To enable/disable it, (and this is what I have implemented) -> Settings -> Editor -> Folding
Eran
But i couldnt find the explanation for Fold-compatc in changelog. it just says "enabled following options: fold for preprocessors, fold compact, fold at else"
So i thought it is something different & i checked it in preference.
Thanks Very Much.eranif wrote: There you will also find the other feature u have requested
Eran
Fold at else doesnt work. Kindly paste the below code. Fold @ else doesnt work for preprocessor or for normal c code.
Code: Select all
#include <stdio.h>
#define TEST_DUMMY_PRE 1
#if (TEST_DUMMY_PRE)
#define DummyTest 1
#else
#define DummyTest 0
#endif
int main(void)
{
int a = 1;
if(a == 1)
printf("a is 1\n");
else
printf("a is not 1\n");
return 0;
}
Also, if i uncheck fold compact option, & check fold pre-processor option, Close Settings dialog & reopen Setting dialog->Folding, Fold Preprocessors is unchecked. And the same is vice-versa also. if Fold-Preprocessor un-checked & fold compact is checked, Closing & re-opening, fold processor is checked.
So is fold compact & fold preprocessor is mutually inclusive. Is it Intentional. Then i have no other option than to have Fold Compact option enabled & have whitespaces included.
Regards
Gururaja
-
- CodeLite Expert
- Posts: 113
- Joined: Fri Jul 11, 2008 9:12 am
- Contact:
Re: [BUG] Incorrect Folding Marking in C files
Hi,
Also regarding Fold Compact & Fold Pre-Processor, Even if Fold Preprocessor & Fold Compact is unchecked, code folding for Preprocessor works inside editor window. Try with earlier code for this testing.
Uncheck Fold Compact & Fold Preprocessor in editor settings->folding
[optional] close & restart Codelite.
[optional] Check again in editor settings->folding for unchecked fold compact & fold preprocessor
View the code attached in previous post
Regards
Gururaja
Also regarding Fold Compact & Fold Pre-Processor, Even if Fold Preprocessor & Fold Compact is unchecked, code folding for Preprocessor works inside editor window. Try with earlier code for this testing.
Uncheck Fold Compact & Fold Preprocessor in editor settings->folding
[optional] close & restart Codelite.
[optional] Check again in editor settings->folding for unchecked fold compact & fold preprocessor
View the code attached in previous post
Regards
Gururaja
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: [BUG] Incorrect Folding Marking in C files
'Fold at Else' is a scintilla feature, and was never meant to work for preprocessors, only for C code.hbr_in wrote:Fold at else doesnt work. Kindly paste the below code. Fold @ else doesnt work for preprocessor or for normal c code.
You wont see it in the sample code you provided since, I dont know if you know this, scintilla's folding works for '{' '}'.
Try this code:
Code: Select all
#include <stdio.h>
#define TEST_DUMMY_PRE 1
#if (TEST_DUMMY_PRE)
#define DummyTest 1
#else
#define DummyTest 0
#endif
int main(void)
{
int a = 1;
if (a == 1){
printf("a is 1\n");
}else{
printf("a is not 1\n");
}
return 0;
}
I noticed this one, it is a bug in the representation. The condition to check/uncheck the 'Fold Preprocessor' on startup is using the one of the 'Fold Compact' (you will notice that they are always in sync, either both checked on unchecked)hbr_in wrote:Also regarding Fold Compact & Fold Pre-Processor, Even if Fold Preprocessor & Fold Compact is unchecked, code folding for Preprocessor works inside editor window
However, it does not affect the functionality. That is, what matters is their state while clicking the OK/Apply button - this is why it is still working.
Eran
Make sure you have read the HOW TO POST thread
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: [BUG] Incorrect Folding Marking in C files
This is now fixed in SVN (revision 2014)eranif wrote:I noticed this one, it is a bug in the representation. The condition to check/uncheck the 'Fold Preprocessor' on startup is using the one of the 'Fold Compact' (you will notice that they are always in sync, either both checked on unchecked)
However, it does not affect the functionality. That is, what matters is their state while clicking the OK/Apply button - this is why it is still working.
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Expert
- Posts: 113
- Joined: Fri Jul 11, 2008 9:12 am
- Contact:
Re: [BUG] Incorrect Folding Marking in C files
Oh OK now i got it. Thanks for clarification.eranif wrote:'Fold at Else' is a scintilla feature, and was never meant to work for preprocessors, only for C code.
You wont see it in the sample code you provided since, I dont know if you know this, scintilla's folding works for '{' '}'.
Regards
Gururaj