Skip to content

Add support for focus-pane subcommand #5464

@zadjii-msft

Description

@zadjii-msft

From the original spec:

focus-pane

focus-pane [--target,-t target-pane]

Moves focus within the currently focused tab to a given pane.

Parameters:

  • --target,-t target-pane: moves focus to the given target-pane. Each pane
    has a unique index (per-tab) which can be used to identify them. These
    indices are assigned in the order the panes were created. If omitted,
    defaults to the index of the currently focused pane (which is effectively a
    no-op).

This one's a bit more involved - we'll need to make sure to give every leaf pane a unique ID, and when we move a control to a new pane, make sure to move that instance's ID as well.

We might want to have a GUID->ID mapping for this. With the work over in #5000, we'll probably want to give individual terminal instances unique GUIDs, to track them across windows. Might be easiest to just track which terminal instance is in a particular pane, and then use that GUID to get the pane ID within the window.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Commandlinewt.exe's commandline argumentsIssue-TaskIt's a feature request, but it doesn't really need a major design.Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions