dotnet / fsharp

The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio
https://dotnet.microsoft.com/languages/fsharp
MIT License
3.92k stars 786 forks source link

Sticky scroll in VS sticks to xml comments (///) #15101

Open abonie opened 1 year ago

abonie commented 1 year ago

Repro steps

In VS with sticky scrolling, put a comment starting with /// right above something "sticky", like a multiline let and scroll down Expected behavior

Sticky scroll sticks to the line with let

Actual behavior

https://user-images.githubusercontent.com/20281641/232490032-3e116277-0c11-43aa-85cd-7345ffcede91.mp4

Sticky scroll sticks to the /// comment

Known workarounds

Ignore it, disable sticky scroll or don't start your comments with ///

Related information

Provide any related information (optional):

ijklam commented 1 year ago

I found that the xml comments are included in the hint range, maybe that's why VS make comments sticky to the top.

The attributes are also included in the hint ranges, and they also stick to the top.

By the way, This makes xml comments unfoldable (because the BlockStructureService will first distinct scopes by the start line number of the hint range). Is this by designed?

ijklam commented 1 year ago

14542 may also related to this