Skip to content

Code formatting causes cursor to jump to EOF #1507

Closed
@Cirzen

Description

@Cirzen

I have my formatting style set to Allman. If I start typing something, e.g. a function, or a process block and put the open-brace at the end of the line, when the formatter kicks in and moves it to the next line, the cursor also jumps to the last line of the file.
Here's a screen grab of what happens.
formatter

Disabling the add-in resolves the issue

System Details

  • Operating system name and version: Win 10 1709
  • VS Code version: 1.26.1
    493869ee8e8a846b0855873886fc79d480d342de
    x64
  • PowerShell extension version: 1.8.3
  • Output from $PSVersionTable:
    Name Value

PSVersion 6.1.0-preview.1
PSEdition Core
GitCommitId v6.1.0-preview.1
OS Microsoft Windows 10.0.16299
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Issue Description

I am experiencing a problem with...

Attached Logs

EditorServices.zip
Follow the instructions in the [README](https://github.com/PowerShell/vscode-powershell#reporting-problems

)
about capturing and sending logs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions