Author Topic: Sintax highlighting #define  (Read 3523 times)

Offline Manolo

  • Multiple posting newcomer
  • *
  • Posts: 47
Sintax highlighting #define
« on: July 13, 2010, 07:40:25 pm »
Hello
The sintax highlighting colour for compiler directives may get loose.
For long #define macros (as such of wx's dynarray.h) as soon as a comment is finished, the colors returns to "normal code".

...
#define  _WX_DECLARE_BASEARRAY(T, name, classexp)                   \
classexp name                                                       \
{                                                                   \
  typedef CMPFUNC SCMPFUNC;
/* for compatibility wuth wxUSE_STL */  \
public:                                                             \
  name();                                                           \
...

I don't know what is desired, all macro in green or just #define
But I don't like the way it is by now.

Thanks
Manolo

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Sintax highlighting #define
« Reply #1 on: July 13, 2010, 08:35:34 pm »
It's a bug in scintillas C/C++-lexer, it's easy to have all code highlighted as preprocessor-code (including the comments), but that's most likely not what you expect.

I will look into it and search the web/scintillas website for this issue and a possible solution.

Offline Manolo

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: Sintax highlighting #define
« Reply #2 on: July 13, 2010, 09:19:49 pm »
Thanks, Jens

Just a suggestion:
I would like to see the preprocessor comand (#define) in green and the rest of the macro in "normal code colors" but dimmed or with some clear background.

Cheers
Manolo

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Sintax highlighting #define
« Reply #3 on: July 14, 2010, 10:01:10 am »
I found this thread: http://www.mail-archive.com/scite-interest@lyra.org/msg01155.html
It looks like the scintilla devs are not willing to change this behaviour.