Skip to content

Code folding/expanding issues when functions have comments in Swift 5.8 with vscode-swift #587

@MartinLau7

Description

@MartinLau7

Issue

I am currently using Swift 5.8. After installing vscode-swift, I noticed issues with expanding and collapsing code when functions have comments.

Functions without comments do not seem to have this problem. It appears to be specifically related to the presence of comments within functions.

I'm not sure when this problem started occurring.

2023-08-22 15_35_17

Steps to Reproduce

  1. Install vscode-swift in VS Code
  2. Create a Swift project
  3. Add functions with comments
  4. Try to collapse/expand the functions

The code will not properly collapse or expand when comments are present.

Expected Behavior

The code folding/expanding should work properly regardless of whether comments are present within functions.

Environment

  • VS Code version: 1.81.1
  • vscode-swift version: 1.5
  • Swift version: 5.8.1
  • OS version: Ubuntu 20.04

Let me know if any other details would be helpful!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions