dotnet / razor

Compiler and tooling experience for Razor ASP.NET Core apps in Visual Studio, Visual Studio for Mac, and VS Code.
https://asp.net
MIT License
505 stars 195 forks source link

Completion filters out matching items #10435

Open Peter-Juhasz opened 5 months ago

Peter-Juhasz commented 5 months ago

VS 17.11.0 P1.1

Completion items that obviously match the completion span gets filtered out for some reason. Something is clearly out of sync here, as you can see reference highlighting is broken, too.

https://github.com/dotnet/razor/assets/9047283/5f768f64-cd0e-4c2f-9686-e980290d7fdf

<div @onclick="() => Selected$$">Test</div>

@code {
    private string? SelectedType;
}
phil-allen-msft commented 5 months ago

When I try out the scenario, I find that Selected$$ followed by typing 't' gives me SelectedType in the completion list, but you may have a different experience.

Peter-Juhasz commented 5 months ago

Unfortunately, this glitch is consistent for me; it typically occurs with identifiers ending in Type. Here is an additional example:

https://github.com/dotnet/razor/assets/9047283/ca635425-94ae-4300-b3c8-788e8310889d