Maybe add support for move-focus subcommand #9124

Closed
opened 2026-01-31 01:46:38 +00:00 by claunia · 2 comments
Owner

Originally created by @zadjii-msft on GitHub (Jun 18, 2020).

Originally assigned to: @zadjii-msft on GitHub.

I'm submitting this one for discussion - I don't think this deserves a spec, but maybe some discussion.

#5464 covers "Add support for focus-pane subcommand". That particular subcommand is tricky, because we'd need to have IDs for Panes, and then that gets into all sorts of discussion like should the ID be for the pane, or the TermControl?.

Since that's hard, I thought I might do something easy like move-focus, which is just the moveFocus action, turned into a wt subcommand. This comes with two caveats:

  • It would be subject to the same bug that moveFocus is, #2398.
  • It would behave non-deterministically with auto splits. The commandline might behave differently if a pane splits in a different direction due to a different initial window size. Official guidance would probably be "make sure to specify the split direction for all split-pane commands if you're using move-focus".

@microsoft/windows-console-team Are we okay with shipping this command with the above caveats?

I'm thinking the command is just

  • move-focus [direction]
    where direction is one of left, right, up, down.
Originally created by @zadjii-msft on GitHub (Jun 18, 2020). Originally assigned to: @zadjii-msft on GitHub. I'm submitting this one for discussion - I don't think this deserves a spec, but maybe some discussion. #5464 covers "Add support for `focus-pane` subcommand". That particular subcommand is tricky, because we'd need to have IDs for Panes, and then that gets into all sorts of discussion like _should the ID be for the pane, or the TermControl?_. Since that's hard, I thought I might do something easy like `move-focus`, which is just the `moveFocus` action, turned into a `wt` subcommand. This comes with two caveats: * It would be subject to the same bug that `moveFocus` is, #2398. * It would behave non-deterministically with `auto` splits. The commandline might behave differently if a pane splits in a different direction due to a different initial window size. Official guidance would probably be "make sure to specify the split direction for all `split-pane` commands if you're using `move-focus`". @microsoft/windows-console-team Are we okay with shipping this command with the above caveats? I'm thinking the command is just * `move-focus [direction]` where `direction` is one of `left`, `right`, `up`, `down`.
Author
Owner

@DHowett commented on GitHub (Jun 19, 2020):

So, when I was talking about how I wanted something more composable than a command that depends on physical location, I wasn't thinking about #4472. I'm not sure it makes sense as something that you can launch with, but... perhaps there's value in it.

@DHowett commented on GitHub (Jun 19, 2020): So, when I was talking about how I wanted something more composable than a command that depends on physical location, I wasn't thinking about #4472. I'm not sure it makes sense as something that you can _launch_ with, but... perhaps there's value in it.
Author
Owner

@ghost commented on GitHub (Jan 28, 2021):

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

Handy links:

@ghost commented on GitHub (Jan 28, 2021): :tada:This issue was addressed in #8546, which has now been successfully released as `Windows Terminal Preview v1.6.10272.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.6.10272.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#9124