Skip to content

[Bug] "Open in Terminal" focuses on last session instead of selected folder #18036

Open
@Gorrrg

Description

Windows Terminal version

7.4.5

Windows build number

22631.4317

Other Software

Using Terminal in combination with File Explorer has a certain risk. When you have closed Terminal with open sessions, it will focus on the last session NO MATTER how you have started Terminal again. Literally focusing on a session open in folder A, even though Terminal was started by the user telling it to open a new session in folder X. When you don't know this and start typing your commands right away without checking you might end up destroying your data depending on the operations you do. I happened to me in a hurry. It destroys your workflow. It opens two Terminal windows, one with the old sessions and a new window with the new session you've openend via the Explorer, but for some stupid reason the former gets the focus.

Steps to reproduce

  • Open a few sessions in folders A, B, C.
  • Close Terminal
  • Use File Explorer to "Open in Terminal" folder X
  • There a now two Terminal windows, and focus is on the one with the old sessions instead of the session you have started Terminal again for

Expected Behavior

Open one Terminal window, add the new session to it, and give it focus. Or open two Terimal windows, the old session and in addition a new window with the new session that you actually want to work in, but focus on the latter.

Actual Behavior

Old session steals the focus, you have to manually switch to the session you have just started with "Open in Terminal".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-WindowingWindow frame, quake mode, tearoutIssue-BugIt either shouldn't be doing this or needs an investigation.Priority-3A description (P3)Product-TerminalThe new Windows Terminal.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions