Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: Manolo on November 26, 2007, 08:40:09 pm
-
Hello
If I check the option "Highlight line under caret" and the
char I type is a '(', next char is hidden. When I type
a second next char, bracket appears again.
Example: type in a highlighted line '(hello' (with no ')
First you don't see the bracket, but the cursor moves.
Next you don't see h, but cursor moves again.
when you type e, everythings reveal.
Is this a bug?
Manolo
-
can't confirm on october 27 rev 4564 build on linux kubuntu
-
I can more or less confirm.
The problem is with syntax-highlighting.
If you type the first bracket, there's no matching bracket that closes it.
The caret is just behind the bracket and it is highlighted as "No matching brace highlight".
That defaults to white on red.
Because of the option "Highlight line under caret" the background does not become red, but light-yellow.
And white on light-yellow is really hard to see, but if you really try, you can see the bracket.
I'm not sure if it is a bug, but I think the highlighted brackets colour-setting should overwrite the highlighted lines colour-setting, and not vice versa.
To get rid of the problem you can change the colour-setting in a way, that this problem does not appear.
-
Yes, changing "syntax highlighting -> no matching brace highlight" foreground to grey did it.
Thanks
Manolo
-
Manalo's work-around solution works, but we lose most of the emphasis of the "unmatched brace" syntax highlighting.
I agree with jens that the syntax highlighting should "win" over the current line highlighting. The rest of the line remains highlighted so we retain the visual clue of position. The unmatched brace should annoy us until closed, for those of us who like syntax highlighting.
Just my $0.02 :)
--Dale