Skip to content

Selection-based refactorings should not appear when there is no selection #1605

@DustinCampbell

Description

@DustinCampbell

Steps to reproduce

In the following code, place the editor caret after 'false'.

using System;

class C
{
    void M()
    {
        Console.WriteLine(false);
    }
}

Expected behavior

No lightbulb should appear

Actual behavior

A lightbulb appears with Extract Method, Introduce Local, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugEditor-Code ActionsfixedFixed and available in the stable version of C# Extension.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions