1

Resolved

Multiple guides highlighted at the same time

description

In the following code:
namespace Demo
{
    public class Class1
    {
        public void Method1()
        {
            // Comment
            // Comment
            // Comment
            // Comment
            // Comment
            // Comment
            // Comment
            // Comment
            // Comment
            // Comment
            // Comment
            // Comment
            // Comment
            // Comment
            // Comment
            // Comment
            // Comment
            // Comment
            // Comment
            // Comment
            // Comment

            for (int pos = 0; pos <= 10; pos++)
            {
                char ch = ' ';
                char next = ' ';
            }
        }
    }
}
  • Place the cursor at the end of the line: char ch = ' ';
  • The guide line before that block is highlighted.
  • Click to put the cursor at the end of any of the lines: // Comment
  • Now the guide line before the method is highlighted as well.
  • Two guide lines are now highlighted!
Making the code sample any shorter in line count does not produce the bug.

Tested with 15 beta 3 in Visual Studio 2015.

comments

Zooba wrote Apr 30, 2016 at 9:49 PM

The problem was the new method of handling large documents and an optimization to avoid rescanning all lines whenever moving the caret. The document had to be that long for the spans to be in different "chunks".

Removing the optimization here fixes the issue, and the optimization is still in place for the more important rendering code.