Brace Matching (Highlight) doesnt work - by MartinFr-

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 534997 Comments
Status Closed Workarounds
Type Bug Repros 3
Opened 2/19/2010 7:57:04 PM
Access Restriction Public



The Brace Matching (Highlight) color which can be set in Tools->Options->"Environment Fonts and Colors" is never shown when braces are matching in the C# Editor. Also the bold option doesnt work either.

The matching elements in the HTML Editor is also not highlighted.

Please be aware that only the Brace Matching (rectangle) color settings seem to work (which is the color of the background), Brace matching (Highlight) color/bold settings is applied to the braces and isnt working.

It used to work in Visual Studio 2008. It seems like this new version is going backwards and have all sorts of very simple bugs which wasnt there in the old version.

This should work as it is a basic feature of any code editor!

Martin :)

There is also a color problem with the Brace Matching (Rectangle - background color) setting - as it is darker in the C# Editor than the defined color (also reported). 

Have tested it on 2 computers - both not working.
Sign in to post a comment.
Posted by chris_lux on 4/16/2010 at 1:03 AM
i am very sad to see that much bugs in regard to the syntax highlighting in the release version. i am more sad to see this report closed. regarding this bug and the usertype.dat keywords wrong highlight bug i think a hotfix would be very useful.
Posted by MartinFr- on 3/4/2010 at 4:57 AM
Thanks for your reply.

It is not how it used to be, brace matching (highlight) is working in Visual Studio 2008, and it is possible to set bold on the matching elements.

But using the brace matching (rectangle) instead isnt a big problem if only the color in the C# editor was correct.

When running a black background you have to set some light color as the brace matching (rectangle) but not to bright so you cant read the text being "highlighted" (retangle background highlighting). This is hard as the C# editor displays the wrong color and it will be darker than the one you have set, soo if it is fine in the Html editor which shows the correct color, then it will be to dark in the C# editor, and if you set a brighter color to make it look fine in the C# editor it will be to bright in the Html editor.

The "Highligted Reference" color isnt correct in the C# editor either.

Posted by Microsoft on 3/3/2010 at 3:24 PM
Hi Martin,

Thanks for your reply. It seems I didn't explain this very well in my previous response, so please allow me to try again. As you've noticed, there are two Fonts and Colors options for brace matching: "Brace matching (Highlight)" and "Brace matching (Rectangle)". Not all languages use both settings. Each language implements its own brace matching functionality, which can lead to inconsistencies in which options are used in which language. For example, C#, HTML, CSS, and a few others do not use the "Brace matching (Highlight)" option at all, which is why it doesn't do anything when you change it in those file types. However, "Brace matching (Rectangle)" should still work for C#, HTML, and CSS, which it sounds like is consistent with your experience. Some other languages will have the reverse behavior, i.e. "Brace matching (Rectangle)" will do nothing but "Brace matching (Highlight)" will work.

That's why I describe this as an inconsistency in how different languages implement the brace matching feature - some use one setting but not the other. The Won't Fix resolution unfortunately stands for VS 2010 RTM, but we'll revisit this for a future version of Visual Studio. And as always, please don't hesitate to post again here if you have any further questions or comments.

Thanks again for your feedback,
Posted by MartinFr- on 2/27/2010 at 5:51 PM
Hello Brittany,

"The behavior you're seeing is due to an inconsistency in how different languages implement brace matching."

I have to comment that it is not working at all! Not in the C# editor, not in the Html Editor, not in the CSS editor (where brace matching rectangle isnt working either), and probably also in all other editors.

Soo what i am seeing is a very basic feature which used to be there, and which is in just about any basic code editor, is no longer implemented in Visual Studio. To me thats a step backwards.

Please dont rush the product when it is clearly not ready, take your time and do it properly.
At least you would expect that it have the same features as previous versions.

To me the core of Visual Studio is the code editor, and at least such a simple feature should be working.
I of course understand that you prioritize otherwise.

Hope you will fix it as soon as possible, as it is really annonying together with the brace matching (retangle) color problem.
Posted by Microsoft on 2/25/2010 at 7:22 PM
Hi Martin,

Thank you for reporting this issue. The behavior you're seeing is due to an inconsistency in how different languages implement brace matching. We unfortunately don't have time to address everything we'd like to fix between the VS 2010 RC and RTM, so I'm resolving this bug as Won't Fix for the current release. However, we agree that these options are confusing and ought to behave consistently across languages, so this Connect bug will remain in our database to be revisited for a future version of Visual Studio.

Thanks for trying the VS 2010 RC and sending your feedback!

Brittany Behrens
Program Manager, VS Platform - Editor
Posted by Microsoft on 2/22/2010 at 12:12 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Thank you
Posted by Microsoft on 2/20/2010 at 7:06 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(