Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: earlgrey on August 12, 2012, 07:50:30 am

Title: Syntax highliting problems with recent svn builds ( > rev 8032 )
Post by: earlgrey on August 12, 2012, 07:50:30 am
- C++ preprocessor directives remain uncolorized ; did I miss a new option ?

- my personal syntax highlight settings are...hum...in fact where have they gone ?

Title: Re: Syntax highliting problems with recent svn builds ( > rev 8032 )
Post by: earlgrey on August 18, 2012, 08:24:37 pm
I guess it has something to do with this topic : http://forums.codeblocks.org/index.php/topic,16720.0.html (http://forums.codeblocks.org/index.php/topic,16720.0.html)...
Title: Re: Syntax highliting problems with recent svn builds ( > rev 8032 )
Post by: Radek on August 24, 2012, 09:39:58 am
On starting Code Blocks today (after some time), I also got surprised what happened to highlighting. Version 8164, svn, 32-bit Gnome, Debian. The highlighting used to work perfectly all the time but now:

- #include directives aren't highlighted (and neither do other compiler directives)
- all "non-chars, non-digits" like brackets, colons, semicolons, operators, etc. have "selected" background and default foreground (like they are in a block)
- selection does not work at all, at least, visually
- the highlighting settings has changed for some reason at some items (comments or digits, for example)

Okay, I have fixed the unwanted changes but I wasn't able to put in work highlighting for compiler directives, "non-chars, non-digits" and selection. The settings for highlighting seem to be okay, all colors are correct in the "choose color" part of the setting dialog but wrong in the "demonstration" part (the piece of code below) and in the editor itself. Closing and reopening does not help. The settings seem to be ignored partially and some defaults seem to be used instead. Unusable.
Title: Re: Syntax highliting problems with recent svn builds ( > rev 8032 )
Post by: Alpha on August 24, 2012, 07:44:54 pm
If possible, can you update to revision 8242 (or newer)?  This revision fixes (or attempts to fix) a longstanding issue with loading custom color schemes.

If problems persist, could you post your default.conf?
Title: Re: Syntax highliting problems with recent svn builds ( > rev 8032 )
Post by: Radek on August 25, 2012, 04:08:25 pm
The latest version for Debian seems to be 8164. I searched for some newest ones but I found only older ones. default.conf is here:
Title: Re: Syntax highliting problems with recent svn builds ( > rev 8032 )
Post by: Alpha on August 26, 2012, 12:58:30 am
Here is a (hopefully) fixed version of your configuration file.  There is a problem with the older code for loading customized color schemes (causing certain types of updates to the lexer to brake custom color schemes), which is fixed in the trunk.  To resolve this, you can: swap your default.conf with the attached one (while waiting for the next package), or compile your own trunk build from source, or suffer with weird highlights :) and just wait for the next pre-built package (which should be soon, as there was just a nightly).
Title: Re: Syntax highliting problems with recent svn builds ( > rev 8032 )
Post by: earlgrey on August 26, 2012, 07:10:48 am
The "preprocessor directives" bug is no more present in svn 8248 ( from Jens Lody repository ).

Alleluja.

_BUT_ at first run :

  * the "Comment ( documentation )" and "Comment line ( documentation )" colors for "C++ syntax highlight" where not loaded correctly. Others colors did.

  * when I tried to reset the 2 values above, it was impossible from the "hex text entry" of the color chooser (the #xxxxxx one ), it was only possible from the 3 decimal RGB text entries.

After closing C::B and relaunch it, these problems had gone away.
Title: Re: Syntax highliting problems with recent svn builds ( > rev 8032 )
Post by: Radek on August 26, 2012, 10:33:12 am
Thanks, Alpha. The fixed default.conf works with 8164 and also with my new 8248 :) Code Blocks now look like they used to do. I am happy :)
Title: Re: Syntax highliting problems with recent svn builds ( > rev 8032 )
Post by: Alpha on August 26, 2012, 05:42:33 pm
Glad it worked.

After closing C::B and relaunch it, these problems had gone away.
Not sure what the problem was, but if it disappeared, I guess it is nothing to worry about :).