Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collapsing if/else block in a .PSM1 file hides the next else condition line #1598

Closed
alongafni opened this issue Nov 2, 2018 · 1 comment

Comments

@alongafni
Copy link

Issue Description

  1. Create a new file test.psm1 and paste this inside:
    Line 1: if (a -eq b) {
    Line 2: do Create Yeoman generator for PowerShell projects #1
    Line 3: } elseif (a -gt b) {
    Line 4: do Signature help does not appear in VS Code 0.10.0 #2
    Line 5: } else {
    Line 6: do Implement document and workspace symbol providers for classes #3
    Line 7: }

  2. collapse line 1

Expected: Only line #2 is hidden
Actual: Lines #2 and #3 are hidden

This happens in PSM1 files but not in PS1 files

Attached Logs

Follow the instructions in the README about
capturing and sending logs.

Environment Information

Visual Studio Code

Name Version
Operating System Windows_NT x64 10.0.17763
VSCode 1.28.2
PowerShell Extension Version 1.9.0

PowerShell Information

Name Value
PSVersion 5.1.17763.1
PSEdition Desktop
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.17763.1
BuildVersion 10.0.17763.1
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Visual Studio Code Extensions

Visual Studio Code Extensions(Click to Expand)
Extension Author Version
beautify HookyQR 1.4.7
debugger-for-chrome msjsdiag 4.10.2
Go ms-vscode 0.6.93
json-tools eriklynd 1.0.2
markdown-preview-enhanced shd101wyy 0.3.11
npm-intellisense christian-kohler 1.3.0
PowerShell ms-vscode 1.9.0
rest-client humao 0.20.3
tslint eg2 1.0.40
vscode-docker PeterJausovec 0.3.1
vscode-eslint dbaeumer 1.7.0
vscode-markdownlint DavidAnson 0.21.0
vscode-npm-script eg2 0.3.5
vscode-todo-highlight wayou 1.0.4
@rjmholt
Copy link
Contributor

rjmholt commented Nov 8, 2018

Hi @alongafni, this should be fixed by #1557, but is not released yet.

You should be able to get a preview build for it here (install with code --install-extension ./PowerShell-insiders.vsix).

I'll close this issue for now, but let us know if that doesn't fix it and we can reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants