GNOME Bugzilla – Bug 621132
'C/CPP' Bracket Matching is corrupted if bracked lay in char '{' '}'
Last modified: 2014-05-09 19:51:32 UTC
Bracket Matching engine have problem with bellow example: { int c = '{'; } Please add < ... class="char"> in c.lang file like bellow <context id="char" style-ref="char" class="char"> <match>L?'(\%{escaped-character}|.)'</match> </context> and change in gtksourcebuffer.c : line ~837 /* This describes a mask of relevant context classes for highlighting matching brackets. Additional classes can be added below */ static const gchar *cclass_mask_definitions[] = { "comment", "string", "char", // <- new 'char' mask class };
Created attachment 163219 [details] [review] Adds the string class to chars in the C language This adds the string class to chars instead of a new char class.
Yes and No ;) Going in this way we should have only one class which we should "omit" because this require only one check. But having many class give you better information where you are but (again ;)) give you several additional checks... Whatever will be chused I will be happy when primary problem will be fixed in default configurations
Yeah I've been thinking and probably is better having a char class. It makes also sense for not checking it in the spell plugin.
Created attachment 164317 [details] [review] Added the char class and applied it to chars in the C language
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
I have reverted the commit. As said on irc context classes are meant to have synctatic meaning to which a logic then applicated, not to just mirror the context name and then have the logic special case specific names. For instance in this cases we need to annotate the class like skip-bracket-match or somthing like that.
*** This bug has been marked as a duplicate of bug 629786 ***