Description
System Details
### VSCode version: 1.43.1 fe22a9645b44368865c0ba92e2fb881ff1afce94 x64
### VSCode extensions:
andyyaldoo.vscode-json@1.5.0
ms-azure-devops.azure-pipelines@1.165.1
ms-azuretools.vscode-azurefunctions@0.21.0
ms-dotnettools.csharp@1.21.15
ms-mssql.mssql@1.9.0
ms-vscode-remote.remote-containers@0.106.0
ms-vscode-remote.remote-ssh@0.50.0
ms-vscode-remote.remote-ssh-edit@0.50.0
ms-vscode-remote.remote-wsl@0.42.4
ms-vscode-remote.vscode-remote-extensionpack@0.20.0
ms-vscode.azure-account@0.8.8
ms-vscode.powershell@2020.3.0
ms-vscode.powershell-preview@2020.3.0
### PSES version: 2.1.0.0
### PowerShell version:
Name Value
---- -----
PSVersion 7.0.0
PSEdition Core
GitCommitId 7.0.0
OS Microsoft Windows 10.0.18362
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Issue Description
When the default file type is PowerShell, and something else (e.g. JSON) is pasted into a new Window many syntax errors are detected and shown in the problem window
However if the document type changed to JSON or Plain Text the errors are not removed
Even if the file is closed the errors remain
Expected Behaviour
PowerShell syntax errors should only appear while the file is present and believed to be a PowerShell file.