Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: secks on September 16, 2010, 08:57:38 pm

Title: Syntax highlighting in between #ifdef prepocessor statements
Post by: secks on September 16, 2010, 08:57:38 pm
I just updated to svn 6595 - Sept 15 2010 11:04:41 - linux, from jenslody and now all code (C++) in between conditional proprocessor commands' syntax highlight is gone .. all code is black .. does anyone know of a setting to disable that?  It's quite annoying and is new to my build .. I can't find any options in settings anywhere about it ..

Example

Code
//this code has normal highlighting
int a;
a = 1;
if(a == 1) {
  #ifdef FAKEDEFINE
    //this code is all black
    cout << "WHY DONT I HAVE COLOR!!!???" << endl;
 #endif
 //back to normal color
  cout << "I have color here though :)" << endl;
}
Title: Re: Syntax highlighting in between #ifdef prepocessor statements
Post by: killerbot on September 16, 2010, 09:29:45 pm
I have noticed this too an hour ago. Could this be related to the wxscintilla upgrade ?
Title: Re: Syntax highlighting in between #ifdef prepocessor statements
Post by: MortenMacFly on September 16, 2010, 10:03:34 pm
I have noticed this too an hour ago. Could this be related to the wxscintilla upgrade ?
Yes! That's one of the new features: Scointilla scans the files for #defines and "greys" what's not relevant.
However, probably we should make this an option.
Title: Re: Syntax highlighting in between #ifdef prepocessor statements
Post by: secks on September 17, 2010, 01:27:01 am
Yes! That's one of the new features: Scointilla scans the files for #defines and "greys" what's not relevant.
However, probably we should make this an option.
It's actually greying out code that will be included from a preprocessor define though .. An option would definitely be nice .. If I had free time I'd look into it but unfortunately I don't at the moment :( ..