dotnet / dotnet/fsharp

Outlining: unfinished statements re-expand collapsed sections

Open
#7,078 2 comments 2 reactions 0 assignees View on GitHub
AI-thinks-windows-only Area-LangService-AutoComplete Bug Impact-Low
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

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](https://user-images.githubusercontent.com/50958617/60371718-15d06a80-99c8-11e9-8c02-620a06e36940.gif)

This seems to be supported in other editors, such as VSCode(+Ionide) or Notepad++.
VSCode:
![FS_Outlining_VSCode](https://user-images.githubusercontent.com/50958617/60371864-a149fb80-99c8-11e9-9b69-8f601b13a669.gif)

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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.