Skip to content

QuickInfo on close curly at end of scope block shows too much code #325

@dpoeschl

Description

@dpoeschl

Ported from TFS WorkItem: 887257


Repro Steps:

Affected Branch:
Affected Build:
Affected Product Language:

Steps to reproduce:

1. Copy/paste C# code:

 

using System;
 
class Program
{
    static void Main(string[] args)
    {
        if (true)
        {
            Console.WriteLine();
            Console.WriteLine();
 
            if (false)
            {
                /*
                This
                is
                the
                if
                block
                */
            }
 
            Console.WriteLine();
            Console.WriteLine();
 
            {
                /*
                This
                is
                just
                a
                block
                */
            } // ******** Hover on the close curly ********
 
            Console.WriteLine();
            Console.WriteLine();
 
            for (; ;)
            {
                /*
                This
                is
                the
                for
                block
                */
            }
        }
    }
}

 

  1. Hover on the close curly brace on line 34 (highlighted above).

 

Expected: Less code. Maybe just the {, or the { and the line immediately after?

Actual:

{
    Console.WriteLine();
    Console.WriteLine();
 
    if (false)
    {
        /*
        This
        is
        the
        if
        block
        */
    }
 
    Console.WriteLine();
    Console.WriteLine();
 
    {

Revisions:

  1. Created By David Poeschl (2/19/2014 12:58:04 PM)

It's currently just going to the block's parent, which is usually correct but not in this case.

Metadata

Metadata

Assignees

Labels

Area-IDEBugVerifiedhelp wantedThe issue is "up for grabs" - add a comment if you are interested in working on it

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions