Skip to content
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

"Open in Terminal" does not work when window has no folders #46139

Closed
garyking opened this issue Mar 19, 2018 · 5 comments · Fixed by #46518
Closed

"Open in Terminal" does not work when window has no folders #46139

garyking opened this issue Mar 19, 2018 · 5 comments · Fixed by #46518
Assignees
Labels
feature-request Request for new features or functionality good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities terminal Integrated terminal issues verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@garyking
Copy link

The "Open in Terminal" does nothing when the current window has no folders.

Instead, if there are no folders, it should open a Terminal window in the same directory as the current file.

@vscodebot vscodebot bot added the terminal Integrated terminal issues label Mar 19, 2018
@Tyriar
Copy link
Member

Tyriar commented Mar 22, 2018

@garyking this works for me, how are you running "Open in Terminal" exactly?

@Tyriar Tyriar added the info-needed Issue requires more information from poster label Mar 22, 2018
@garyking
Copy link
Author

garyking commented Mar 22, 2018

I'm using Command Palette > Open New Terminal while I have a saved file focused in VSC.

open new terminal

@Tyriar
Copy link
Member

Tyriar commented Mar 23, 2018

That command opens the active workspace folder currently. Maybe we should fallback to the active file if there is no folder open? Open to PRs

@Tyriar Tyriar added help wanted Issues identified as good community contribution opportunities feature-request Request for new features or functionality good first issue Issues identified as good for first-time contributors and removed info-needed Issue requires more information from poster labels Mar 23, 2018
@mkavidas
Copy link
Contributor

I would like to work on this as my first bug. Could I get some advice on how I should go about fixing this?

@Tyriar
Copy link
Member

Tyriar commented Mar 23, 2018

@mkavidas Great! All the external terminal code is located in the "execution" part https://github.com/Microsoft/vscode/tree/master/src/vs/workbench/parts/execution

You change will be in here:

https://github.com/Microsoft/vscode/blob/45bfe40a61af00eff2c03faaa63bf4656aff42c9/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts#L117-L120

Utilizing the IWorkspaceContextService (see this for how to pull it into that file).

@Tyriar Tyriar added this to the April 2018 milestone Mar 31, 2018
Tyriar added a commit that referenced this issue Mar 31, 2018
fixed terminal doesn't open when window has no folders, fixes #46139
@Tyriar Tyriar added the verification-needed Verification of issue is requested label Apr 23, 2018
@isidorn isidorn added the verified Verification succeeded label Apr 24, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators May 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities terminal Integrated terminal issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants