Home Dashboard Directory Help

Syntax coloring quits working when declaring large string by David Beechum


 as Duplicate Help for as Duplicate

Sign in
to vote
Type: Bug
ID: 800982
Opened: 9/16/2013 11:16:58 AM
Access Restriction: Public
User(s) can reproduce this bug


I have a unit test class with a test method somewhere around halfway in the file. Syntax coloring does not work for the second half of the file. After trying to figure out what the issue is, I have determined that the string listed in the steps to reproduce is causing the syntax coloring to quit working. It should be noted that the class file compiles and all the test methods in the file run without issue.
Sign in to post a comment.
Posted by Microsoft on 11/10/2013 at 1:39 PM

Thank you for reporting this issue. The Editor stops syntax coloring after encountering long lines for performance reasons and by default the threshold is 32k. We will certainly improve the experience in future versions depending on the customer feedback.

As a workaround, you can change this threshold by creating a registry key:

HKCU\Software\Microsoft\VisualStudio\11.0\Text Editor\Global Options

and in that key creating a DWORD value with name "LongBufferLineThreshold" and set it to whatever value you like as the new limit.

Murali Krishna
Program Manager,
Visual Studio Language Experience
Posted by Microsoft on 9/17/2013 at 12:09 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 9/16/2013 at 11:51 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
Posted by Viorel_ on 9/16/2013 at 10:46 PM
Move this function, or introduce constants, to the end of the class.
File Name Submitted By Submitted On File Size  
EntireTestMethodString.txt 9/16/2013 44 KB
SyntaxColoringNotWorking.PNG 9/16/2013 15 KB