Skip to content

Right-click menu missing options when language mode set to PowerShell but file not PowerShell #1473

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
corbob opened this issue Aug 8, 2018 · 3 comments
Labels
Area-UI Issue-Bug A bug to squash. Up for Grabs Will shepherd PRs.

Comments

@corbob
Copy link
Contributor

corbob commented Aug 8, 2018

System Details

  • Operating system name and version: Windows 10 1803
  • VS Code version: Insiders
  • PowerShell extension version: 1.8.2
  • Output from $PSVersionTable:
Copy / paste the following commands into the PowerShell Integrated Console, and paste the output here:

PS C:\m\r\PT-Tools> code-insiders -v
1.26.0-insider
19df280c7f7cf73d9bafcde82a9e93b14026cfc2
x64
PS C:\m\r\PT-Tools> $pseditor.EditorServicesVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
1      8      2      0


PS C:\m\r\PT-Tools> code-insiders --list-extensions --show-versions
CoenraadS.bracket-pair-colorizer@1.0.59
donjayamanne.githistory@0.4.2
eamodio.gitlens@8.5.4
fatihacet.gitlab-workflow@0.6.0
ms-mssql.mssql@1.4.0
ms-vscode.PowerShell@1.8.2
slevesque.vscode-autohotkey@0.2.2
wesbos.theme-cobalt2@2.1.6
PS C:\m\r\PT-Tools> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.17134.165
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17134.165
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

  1. Open an untitled document.
  2. Change language to PowerShell.
  3. Select text in the editor
  4. Right click
    • Expected result: Option to lookup help, or run selected text
  5. Save file as .ps1 file
  6. Right click
    • now have the option to lookup help, or run selected text

Attached Logs

I have not attached logs as this appears to be related to lines 161-172 of package.json using resourceLangId instead of editorLangId. Based on microsoft/vscode#26873 (comment) We should be using editorLangId for this as it's an editor right click menu and doesn't make sense to use it in the Explorer view.

@TylerLeonhardt TylerLeonhardt added Issue-Bug A bug to squash. Area-UI labels Aug 9, 2018
@TylerLeonhardt
Copy link
Member

Awesome research @corbob - we should change the whens to use editorLangId instead of resourceLangId 😄

https://github.com/PowerShell/vscode-powershell/blob/master/package.json#L163-L170

@TylerLeonhardt TylerLeonhardt added the Up for Grabs Will shepherd PRs. label Aug 9, 2018
@corbob
Copy link
Contributor Author

corbob commented Aug 10, 2018

PR #1475 opened for this 😄

@rjmholt
Copy link
Contributor

rjmholt commented Aug 10, 2018

Closed by #1475

@rjmholt rjmholt closed this as completed Aug 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-UI Issue-Bug A bug to squash. Up for Grabs Will shepherd PRs.
Projects
None yet
Development

No branches or pull requests

3 participants