Author Topic: Solved: Code Dimmed for successful#ifdef block  (Read 6436 times)

Offline zeroth

  • Multiple posting newcomer
  • *
  • Posts: 27
Solved: Code Dimmed for successful#ifdef block
« on: January 18, 2013, 06:45:34 pm »
I've got a defines listed in my project's build options, and an #ifdef for it in a cpp file. the define is true, and the code compiles and executes. however, codeblocks dims the code inside the #ifdef block... and it shouldn't. It's annoying to code in this area because of this.

Is this a bug or was codeblocks just never coded to look for defines there? I'd hack in a quick work-around if I knew what I was looking for... is "code dimming" the proper terminology for this feature?

CodeBlocks svn 8468
« Last Edit: January 18, 2013, 08:17:12 pm by zeroth »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Code Dimmed for successful#ifdef block
« Reply #1 on: January 18, 2013, 06:53:42 pm »
This depends on the version of C::B you use.
Look into "Settings -> Editor ... -> General settings -> C/C++ editor settings".

Offline zeroth

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Code Dimmed for successful#ifdef block
« Reply #2 on: January 18, 2013, 07:51:28 pm »
I presume "Collect defines from the project file" is what you were looking for?


Offline zeroth

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Code Dimmed for successful#ifdef block
« Reply #3 on: January 18, 2013, 08:17:02 pm »
After unchecking and re-checking that option, the problem is now resolved.

Offline euzkoarima

  • Single posting newcomer
  • *
  • Posts: 8
Re: Solved: Code Dimmed for successful#ifdef block
« Reply #4 on: January 18, 2013, 11:06:53 pm »
I'm using 12.11 release version on Ubuntu 12.04
Works ok with defines in build options and defines in the same source, but fail with defines in headers !!