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

Ctrl+click "Open in Editor" from terminal in editor group opens file in same group as editor #130613

Closed
jabcross opened this issue Aug 11, 2021 · 2 comments
Assignees
Labels
insiders-released Patch has been released in VS Code Insiders polish Cleanup and polish issue terminal General terminal issues that don't fall under another label terminal-editors

Comments

@jabcross
Copy link

Currently, ctrl+clicking a file path in an editor terminal opens the file in the same group, replacing the terminal. This happens even if the file is already open in a different group.

I expected the behavior to be similar to the panel terminal, where the terminal remains visible. I'd also expect it to give preference to a group that is already displaying the file.

Could be related to #124709.

@bpasero
Copy link
Member

bpasero commented Sep 6, 2021

Terminal can control how the file opens via options such as:

Given groups new auto-lock for a terminal at least when the terminal is opened to the side this issue should no longer persist.

I would think it makes sense that the terminal sets revealIfOpened, at least when showing as editor.

I think I had suggested it before already, I am open to introduce a new IEditorService#openEditor group constant (besides ACTIVE_GROUP and SIDE_GROUP) to force open the editor in a different group that is not the active one, but maybe this is not needed.

@bpasero bpasero removed their assignment Sep 6, 2021
@meganrogge meganrogge added the under-discussion Issue is under discussion for relevance, priority, approach label Sep 7, 2021
@meganrogge meganrogge added this to the September 2021 milestone Sep 7, 2021
@Tyriar Tyriar added polish Cleanup and polish issue terminal General terminal issues that don't fall under another label and removed under-discussion Issue is under discussion for relevance, priority, approach labels Sep 7, 2021
@Tyriar
Copy link
Member

Tyriar commented Sep 7, 2021

To verify:

  1. Open README.md
  2. Open a terminal and move to the 2nd editor group
  3. Unlock the 2nd editor group
  4. Run echo ./README.md in terminal
  5. Ctrl/cmd+click the link, it should reveal/focus README.md in the first group

@Tyriar Tyriar closed this as completed in e9f77ae Sep 7, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
insiders-released Patch has been released in VS Code Insiders polish Cleanup and polish issue terminal General terminal issues that don't fall under another label terminal-editors
Projects
None yet
Development

No branches or pull requests

5 participants
@bpasero @Tyriar @jabcross @meganrogge and others