$PSVersionTable:1.22.2
3aeede733d9a3098f7b4bdc1f66b63b0f48c1ef9
ia32
Major Minor Build Revision
----- ----- ----- --------
1 6 0 0
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
Name Value
---- -----
PSVersion 5.1.16299.251
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.16299.251
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
After update to Code 1.22.2, the PowerShell extension does not let me press enter in some situations. The newline appears but focus returns to the previous line.
See https://youtu.be/Yql5mJbVHsk for demo.
Problem disappears if I disable PowerShell extension. I am unsure if I tried this scenario with 1.22.x earlier versions but certainly it worked a month ago.
I don't have that issue.
Here is my settings file, for reference, in case there is some connection here:
{
"files.autoSave": "afterDelay",
"editor.wordWrap": "on",
"editor.tabSize": 4,
"editor.wrappingIndent": "none",
"editor.minimap.enabled": false,
"editor.find.seedSearchStringFromSelection": false,
"editor.find.autoFindInSelection": true,
"editor.formatOnType": true,
"editor.formatOnPaste": true,
"window.reopenFolders": "none",
"files.trimTrailingWhitespace": true,
"search.useIgnoreFilesByDefault": true,
"powershell.integratedConsole.showOnStartup": false,
"eslint.enable": true,
"git.confirmSync": false,
"workbench.colorTheme": "Visual Studio Light",
"plantuml.exportSubFolder": false,
"plantuml.exportFormat": "png",
"git.enableSmartCommit": true,
"workbench.welcome.enabled": false,
"extensions.ignoreRecommendations": false,
"window.zoomLevel": 0,
"git.autofetch": true
}
{
"vsicons.dontShowNewVersionMessage": true,
"team.showWelcomeMessage": false,
"html.format.wrapLineLength": 0,
"sync.gist": "",
"sync.lastUpload": "",
"sync.autoDownload": false,
"sync.autoUpload": false,
"sync.lastDownload": "",
"sync.forceDownload": false,
"sync.anonymousGist": false,
"sync.host": "",
"sync.pathPrefix": "",
"sync.quietSync": false,
"sync.askGistName": false,
"workbench.activityBar.visible": true,
"workbench.statusBar.visible": true,
"window.menuBarVisibility": "default",
"window.zoomLevel": 0,
"powershell.powerShellExePath": "C:\\WINDOWS\\SysWow64\\WindowsPowerShell\\v1.0\\powershell.exe",
}
Here's mine. I would say you need to check if you remove editor.formatOnType/.formatOnPaste.
This seems to have some dependency on the file contents. By randomly changing parts of the file, I can get the effect to disappear. It is pretty hard to narrow it down - deleting random lines in various parts of the file just magically fixes it.
I am finding it hard to nail down a repro given the erratic behavior. Is there some way I can submit my project files privately for investigation?
Glad you're not totally blocked. It's sounding like it could be related to https://github.com/PowerShell/vscode-powershell/issues/1154
Which could be related to ScriptAnalyzer being run in the background.
You can email sensitive data to [email protected] this will only go to Microsoft employees.
Great. Sent you a file to repro this with.
I notice that the problem does not occur if I press enter before the "0 references" lines appear in the editor.
I also noticed what might be laggy undo actions while experimenting but it seemed too random to be able to say anything for sure. Just felt that undo sometimes took some hundreds of milliseconds to do its work.
@sandersaares Can you disable the format on type and format on paste features in your settings and see if you still see the issue?
The issue stops occurring if I disable the format on type feature.
Thanks for the info! We'll take a look. @ramya-rao-a thanks for offering the suggestion 馃憤
@sandersaares I got your email! Thanks!
Seems like our formatting isn't as good as it should be for "format on type".