Add support for focus-pane subcommand #7544

Closed
opened 2026-01-31 01:06:53 +00:00 by claunia · 1 comment
Owner

Originally created by @zadjii-msft on GitHub (Apr 22, 2020).

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.

Originally created by @zadjii-msft on GitHub (Apr 22, 2020). 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.
Author
Owner

@ghost commented on GitHub (May 25, 2021):

:tada:This issue was addressed in #10142, which has now been successfully released as Windows Terminal Preview v1.9.1445.0.🎉

Handy links:

@ghost commented on GitHub (May 25, 2021): :tada:This issue was addressed in #10142, which has now been successfully released as `Windows Terminal Preview v1.9.1445.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.9.1445.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7544