Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for focusPane action, focus-pane subcommand #10142

Merged
8 commits merged into from
May 21, 2021
Merged

Conversation

zadjii-msft
Copy link
Member

Summary of the Pull Request

Adds support for the focusPane action, and the focus-pane subcommand. These allow the user to focus a pane by it's ID.

  • focusPane accepts an id, identifying the id of the pane to focus.
  • focus-pane, fp requires the parameter --target,-t to ID the pane it's going to focus.

PR Checklist

Detailed Description of the Pull Request / Additional comments

The ID isn't totally useful right now, since users can't see them. But they're there, and used in-order. This is just slightly more ergonomic for complicated commandlines than mf up; mf left

Validation Steps Performed

Tested in command palette
Tested a variety of commandlines. wtd -w 0 mf down ; sp and wtd -w 0 fp -t 1 ; sp gave me special difficulty.

@ghost ghost added Area-Commandline wt.exe's commandline arguments Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. labels May 20, 2021
Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

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

Approving contingent on the resw file thing

@zadjii-msft zadjii-msft added the Needs-Second It's a PR that needs another sign-off label May 21, 2021
Copy link
Member

@lhecker lhecker left a comment

Choose a reason for hiding this comment

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

Personally, I couldn't find any real issues. ¯\_(ツ)_/¯

src/cascadia/TerminalApp/AppCommandlineArgs.cpp Outdated Show resolved Hide resolved
// Make sure to use _FocusFirstChild here - that'll properly update the
// focus if we're in startup.
_FocusFirstChild();
return true;
Copy link
Member

Choose a reason for hiding this comment

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

If this returns, you don't need the else.

src/cascadia/TerminalApp/TerminalTab.h Outdated Show resolved Hide resolved
@DHowett DHowett removed the Needs-Second It's a PR that needs another sign-off label May 21, 2021
@DHowett
Copy link
Member

DHowett commented May 21, 2021

@msftbot merge this in 10 minutes

@ghost ghost added the AutoMerge Marked for automatic merge by the bot when requirements are met label May 21, 2021
@ghost
Copy link

ghost commented May 21, 2021

Hello @DHowett!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

  • I won't merge this pull request until after the UTC date Fri, 21 May 2021 21:46:20 GMT, which is in 10 minutes

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

@ghost ghost merged commit 3f82613 into main May 21, 2021
@ghost ghost deleted the dev/migrie/f/focus-pane branch May 21, 2021 21:56
@ghost
Copy link

ghost commented May 25, 2021

🎉Windows Terminal Preview v1.9.1445.0 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Commandline wt.exe's commandline arguments Area-User Interface Issues pertaining to the user interface of the Console or Terminal AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

moveFocus to panel using number Add support for focus-pane subcommand
3 participants