Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/fsharp/vs/ServiceStructure.fs
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,9 @@ module Structure =
| [], [] -> List.rev res
| [], _ -> List.rev (currentBulk::res)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine that currentBulk is a legacy typo for currentBlk, it probably makes sense to fix this while here.

| r :: rest, [] -> loop rest res [r]
| r :: rest, last :: _ when r.StartLine = last.EndLine + 1 ->
| r :: rest, last :: _
when r.StartLine = last.EndLine + 1 ||
sourceLines.[last.EndLine..r.StartLine - 2] |> Array.forall System.String.IsNullOrWhiteSpace ->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vasily-kirichenko what is it that ensures that r.StartLine > 2 here? Is it possible that r.StartLine may = 1?

loop rest res (r::currentBulk)
| r :: rest, _ -> loop rest (currentBulk::res) [r]
loop input [] []
Expand Down
Loading