Eclipse CDT disabled code background color

Facing a weird code coloring issue when trying to view disabled code.

For blocks of code that are disabled with #ifdef or #ifndef statements, I get a grey/white background:

Eclipse grey background for disabled code

However, when the code is enabled, things are okay:

Eclipse correct background for enabled code

Where can I find this color property in the properties menu? I can't find anything about disabled code, and it isn't under any of the pre-processor color coding menus.

Upvotes: 8

Views: 3772

Answers (1)

As suggested here:

Preferences -> C/C++ -> Editor, “Highlight inactive code” checked, Appearance color options: Inactive code highlight.

Upvotes: 9

Related Questions