Skip to content

feat: Support switching to the main window. - #306573

Merged
Benjamin Pasero (bpasero) merged 2 commits into
microsoft:mainfrom
matts1:switch-main
Apr 14, 2026
Merged

Benjamin Pasero (bpasero) merged 2 commits into
microsoft:mainfrom
matts1:switch-main

Conversation

@matts1

Copy link
Copy Markdown
Contributor

From an auxilary window, there is currently no way to switch back to the main window.

This particularly an issue when you have a floating terminal window, as there is no key binding that can easily take you back to the correct split of the main editor (there is no active editor group, so "focus active editor group" doesn't work).

To test the changes:

  1. Compile & open vscode
  2. control shift p -> new terminal window
  3. Create a split in the main window and focus the left
  4. (from the main window) control shift p -> Switch to main window should not appear
  5. (from the terminal window) control shift p -> switch to main window should switch the focus back to the left split of the main window
  6. Repeat the process with the right split

Fixes #306571

@vs-code-engineering

vs-code-engineering Bot commented Mar 31, 2026 •

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Dmitriy Vasyura (@dmitrivMS)

Matched files:

  • test/sanity/scripts/run-docker.cmd
  • test/sanity/scripts/run-win32.cmd

@matts1

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree company="Google"

@bpasero Benjamin Pasero (bpasero) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be easier to just use the global mainWindow with its window ID?

@matts1
Matt (matts1) force-pushed the switch-main branch 2 times, most recently from 86dd5e9 to 01a7906 Compare April 1, 2026 21:40

@bpasero Benjamin Pasero (bpasero) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bpasero

Copy link
Copy Markdown
Contributor

Looks like there are conflicts now.

@bpasero

Copy link
Copy Markdown
Contributor

Copilot resolve the merge conflicts in this pull request

From an auxilary window, there is currently no way to switch back to the main window.

This is particularly an issue when you have a floating terminal window, as there is no key binding that can easily take you back to the correct split of the main editor (there is no active editor group, so "focus active editor group" doesn't work).
@matts1

Copy link
Copy Markdown
Contributor Author

It didn't look like copilot was doing anything, so I rebased manually and pushed

@bpasero
Benjamin Pasero (bpasero) merged commit a8e8b8a into microsoft:main Apr 14, 2026
26 checks passed
@matts1
Matt (matts1) deleted the switch-main branch April 15, 2026 04:10
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators May 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a mechanism to switch to the main window from auxilary windows

4 participants