Bug #18790 2012-11-13 08:21

krlez

Highliting of inactive code C/C++

svn Build 8549, win7 x64

Highliting of inactive code C/C++ doesn't work correctly when:

1) definition is made in "settings->compiler->compiler settings->#defines" or in "project->build options->compiler settings->#defines". Code looks inactive when should be active until project is closed and reopened twice.

2) definition made in another file. Definition from header file included in source file doesn't mark code as active when it should.

Category
Application::Editor
Group
 
Status
Closed
Close date
2012-11-26 10:26
Assigned to
mortenmacfly
alpha0010 2012-11-16 03:40

The method by which defines are collected is (currently) rather unsophisticated. If the inaccuracies are too bothersome, you can disable it via "Settings->Editor...->C/C++ Editor settings".

1) This is because defines are collected when the build target switches and when the project is opened; unfortunately, each editor tab must be closed and reopened for it to update.

2) More advanced parsing would be semantic highlighting. A plugin was started (http://forums.codeblocks.org/index.php/topic,16249.0.html), but seems to have stalled...

mortenmacfly 2012-11-26 10:26

Explanation in the comments.

Please don't use that feature for the moment if you are unhappy with it. Alternatively provide the required pre-processor settings via the project/target settings. Parsing pre-processor directives correctly is a very tough task.

Don't expect magic here... sorry.