News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Bug Syntax Highlighting a Comment within a C macro

Started by ftabba, July 29, 2008, 07:47:24 AM

Previous topic - Next topic

ftabba

Hi,

I read the sticky post on reporting bugs; so hopefully I got it right :)

Let me start by saying job well done. Last time I tried code:blocks was about a year ago and I wasn't too satisfied, but I downloaded it again yesterday and I think it's great.

Anyway, I found a syntax highlighting bug in C macros if they contain a comment, where the comment sort of breaks syntax highlighting out of macro mode:-

#define MACRO green /*grey*/ normal highlighting

#define MACRO \
        green /*grey*/ normal \
        highlighting


If you paste the code above in a C file, the whole bit should be green since it's a macro, the comment grey is part of the macro itself. However, in code:blocks the comment grey break the highlighting out of macro mode.

The version I'm using is 8.02-0ubuntu1 by the way.

Keep up the good work!
/Fuad


Wolf

This is a bug with Scintilla's lexer. I can reproduce it in Notepad++, which also uses Scintilla as a syntax highlighter.