Skip to content

Script outline doesn't show correct indentation anymore #4783

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

Closed
6 tasks done
Stephanevg opened this issue Oct 12, 2023 · 12 comments
Closed
6 tasks done

Script outline doesn't show correct indentation anymore #4783

Stephanevg opened this issue Oct 12, 2023 · 12 comments
Assignees
Labels
Issue-Bug A bug to squash. Resolution-Fixed Will close automatically.

Comments

@Stephanevg
Copy link

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

It looks like the outline is not working properly anymore

using this sample code

Class plop {
    $var1

    [string]SayWhat() {
        return "whaaat!"
    }
}

function woop {
    $var2

    $a = [plop]::New()
    $a.SayWhat()
}

image

Everything is shown on the same line. The method SayWhat() is not 'in' the Plop Class. The $a variable is not under the 'woop' function

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.3.8
PSEdition                      Core
GitCommitId                    7.3.8
OS                             Microsoft Windows 10.0.22000
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visual Studio Code Version

1.83.1
f1b07bd25dfad64b0167beb15359ae573aecd2cc
x64

Extension Version

Steps to Reproduce

Open vscode and sample script
press CTRL+ALT+B

indentation is not respected

Visuals

No response

Logs

No response

@Stephanevg Stephanevg added the Issue-Bug A bug to squash. label Oct 12, 2023
@andyleejordan
Copy link
Member

That is correct, I have a work-in-progress fix for it here PowerShell/PowerShellEditorServices#2084

@Stephanevg
Copy link
Author

Stephanevg commented Nov 7, 2023

Hi @andyleejordan thank you so much for working on this bug! I saw the status of PowerShell/PowerShellEditorServices#2084 is now merged in main, does that mean that this fix is already present in the latest version of vscode? From which version ?

Because I just downloaded the latest version (see below) and the bug still exists there😿

Version: 1.84.1 (system setup)
Commit: 2b35e1e6d88f1ce073683991d1eff5284a32690f
Date: 2023-11-06T12:35:59.022Z
Electron: 25.9.2
ElectronBuildId: 24603566
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.22000

Or maybe I am just being to impatient.... 🙄 😊 ?
Thanks again!

@andyleejordan
Copy link
Member

It's in the pre-release! Give that a try.

@andyleejordan
Copy link
Member

I lied, there isn't a pre-release with that out yet.

@Stephanevg
Copy link
Author

😭

@andyleejordan
Copy link
Member

Working on it! A pre-release should be out today if all goes according to plan.

@andyleejordan
Copy link
Member

@Stephanevg got a pre-release out for you last night!

@Stephanevg
Copy link
Author

Stephanevg commented Nov 13, 2023

Hey @andyleejordan thank you so much in beeing so quick to release these fixes!
(I was actually not a VSCode insider user). But just downloaded everything, and I actually still have the issue (Or am I not using the latest release? )

Version: 1.85.0-insider (user setup)
Commit: 345c8d0927402d41f42402411d856eeec4013e5e
Date: 2023-11-13T05:39:23.476Z
Electron: 25.9.2
ElectronBuildId: 24603566
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.22000

image

ps: Additional info: I do not have the same issue with JSON or XML files for example.

@andyleejordan
Copy link
Member

andyleejordan commented Nov 13, 2023

That is VS Code Insiders, which is not necessary. The extension has a "pre-release" channel in the marketplace
image

Try that! It should install v2023.11.0.

@Stephanevg
Copy link
Author

Ok, in the preview version the bug is actually fixed! 🥳 Thanks so much @andyleejordan 👍 🦄 👍

@andyleejordan
Copy link
Member

Heck yeah! It was a bit complicated so I am happy to hear it's working.

@andyleejordan andyleejordan added the Resolution-Fixed Will close automatically. label Nov 29, 2023
@andyleejordan andyleejordan self-assigned this Nov 29, 2023
@github-actions github-actions bot added the Stale label Nov 30, 2023
Copy link
Contributor

This issue has been labeled as resolved and has not had any activity for one or more days. It has been closed for housekeeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug A bug to squash. Resolution-Fixed Will close automatically.
Projects
Status: Done
Development

No branches or pull requests

2 participants