Skip to content

Outlining: unfinished statements re-expand collapsed sections #7078

@Kelvin4702

Description

@Kelvin4702

Using the following file:

namespace OutliningTest

module File1 =

    module BeforeModule =
        let foo = "bar"

    // Before
    // comment
    type BeforeType =
        | Hello
        | World of int

    // Paste repro here (line 15)


    module AfterModule =
        let foo = "bar"

    // After
    // comment
    type AfterType =
        | Hello
        | World of int

Repro steps:

  • Turn off automatic brace completion in F# Editor options (optional, but helps to create unfinished statements, unmatched double-quotes, braces, parentheses, etc.)
  • Paste the test file above into VS.
  • Collapse all but the File1 module.
  • Type or paste any of the following onto line 15.
    • let a = (4 spaces preceeding: expands blocks after it)
    • let a = (8 spaces preceeding: expands blocks after it, and the block containing it)
    • "unfinished string (4 spaces preceeding: expands blocks after it)
    • "unfinished string (8 spaces preceeding: expands blocks after it, and the block containing it)
    • [1;2;3] |> (4/8 spaces preceeding)
    • doSomething( (4/8 spaces preceeding)
    • match x with (4/8 spaces preceeding)
    • ... list goes on

Sample in VS2019:
FS_Outlining_VS2019

This seems to be supported in other editors, such as VSCode(+Ionide) or Notepad++.
VSCode:
FS_Outlining_VSCode

Environment:
Windows 10 Enterprise (10.0.17763)
Visual Studio 2019 (16.1.3) (but same on 2017)
Visual F# Tools 10.4 for F# 4.6 (16.1.0-beta.19253.3+42526fe359672a05fd562dc16a91a43d0fe047a7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-LangService-AutoCompleteautocomplete/intellisenseBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.

    Type

    Projects

    Status

    New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions