ionide / ionide-vscode-fsharp

VS Code plugin for F# development
http://ionide.io
MIT License
849 stars 276 forks source link

Editor Sticky Scrolling pins attribute instead of module/type declaration #1981

Open samritchie opened 5 months ago

samritchie commented 5 months ago

Describe the bug

When editor sticky scrolling is enabled, and a declaration (specifically seems to be a module or type) has an attribute on the preceding line, sticky scrolling pins the attribute rather than the module/type declaration. Functions and members appear to work properly.

This behaviour looks similar to an old issue for C# sticky scrolling: https://github.com/microsoft/vscode/issues/157375 and was fixed by https://github.com/microsoft/vscode/pull/157466

Steps to reproduce

  1. Enable editor.stickyScroll.enabled
  2. Open an F# file with a module or type that has an attribute declared on the previous line
  3. Scroll down
  4. The attribute will be pinned as the sticky header, and not the module declaration

Expected behaviour

The Attribute scrolls out of view and the module declaration line is pinned instead

Screenshots

https://github.com/ionide/ionide-vscode-fsharp/assets/309444/d962afa8-2d9d-4463-b1a5-0bab26df8fb6

Machine info