[PR #10142] [MERGED] Add support for focusPane action, focus-pane subcommand #27918

Open
opened 2026-01-31 09:25:08 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/10142
Author: @zadjii-msft
Created: 5/20/2021
Status: Merged
Merged: 5/21/2021
Merged by: @undefined

Base: mainHead: dev/migrie/f/focus-pane


📝 Commits (8)

  • 97c9213 Accidentally the whole thing. wtd -w 0 fp -t 1 ; sp doesn't seem to work right though
  • e6ed505 Fix this specific scenario
  • 8bba2e4 Tests, tests are good
  • 103091d schema schmema
  • 6623fbb Merge remote-tracking branch 'origin/main' into dev/migrie/f/focus-pane
  • 408eeb9 fricken VS and it's dumb resw rules
  • 31b823a This would be a merge conflict
  • 0ceee82 Apply suggestions from code review

📊 Changes

16 files changed (+342 additions, -54 deletions)

View changed files

📝 doc/cascadia/profiles.schema.json (+18 -0)
📝 src/cascadia/LocalTests_TerminalApp/CommandlineTest.cpp (+103 -0)
📝 src/cascadia/TerminalApp/AppActionHandlers.cpp (+17 -0)
📝 src/cascadia/TerminalApp/AppCommandlineArgs.cpp (+45 -2)
📝 src/cascadia/TerminalApp/AppCommandlineArgs.h (+5 -0)
📝 src/cascadia/TerminalApp/Pane.cpp (+29 -18)
📝 src/cascadia/TerminalApp/Pane.h (+4 -4)
📝 src/cascadia/TerminalApp/Resources/en-US/Resources.resw (+10 -0)
📝 src/cascadia/TerminalApp/TerminalTab.cpp (+5 -0)
📝 src/cascadia/TerminalApp/TerminalTab.h (+3 -2)
📝 src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp (+2 -1)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.cpp (+10 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.h (+52 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.idl (+6 -0)
📝 src/cascadia/TerminalSettingsModel/AllShortcutActions.h (+29 -27)
📝 src/cascadia/TerminalSettingsModel/Resources/en-US/Resources.resw (+4 -0)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/10142 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 5/20/2021 **Status:** ✅ Merged **Merged:** 5/21/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/migrie/f/focus-pane` --- ### 📝 Commits (8) - [`97c9213`](https://github.com/microsoft/terminal/commit/97c92132642d38d32124ad5bdf484d746699ed04) Accidentally the whole thing. `wtd -w 0 fp -t 1 ; sp` doesn't seem to work right though - [`e6ed505`](https://github.com/microsoft/terminal/commit/e6ed50559332ecc28dc6a66cd629844696cf88b0) Fix this specific scenario - [`8bba2e4`](https://github.com/microsoft/terminal/commit/8bba2e4cd7726d394d32c3b19b1fffeeeba18be4) Tests, tests are good - [`103091d`](https://github.com/microsoft/terminal/commit/103091de8583841d12d229751e95153d22c2a161) schema schmema - [`6623fbb`](https://github.com/microsoft/terminal/commit/6623fbbcc4342b1147947cb936abb76af92d1953) Merge remote-tracking branch 'origin/main' into dev/migrie/f/focus-pane - [`408eeb9`](https://github.com/microsoft/terminal/commit/408eeb98364f656eb4c2913d112e7a287cfd5bdd) fricken VS and it's dumb resw rules - [`31b823a`](https://github.com/microsoft/terminal/commit/31b823a88dfadc292cc86234a7d5305281ca192f) This would be a merge conflict - [`0ceee82`](https://github.com/microsoft/terminal/commit/0ceee823d2624ae2cb0a5d639dc25d1c581e652c) Apply suggestions from code review ### 📊 Changes **16 files changed** (+342 additions, -54 deletions) <details> <summary>View changed files</summary> 📝 `doc/cascadia/profiles.schema.json` (+18 -0) 📝 `src/cascadia/LocalTests_TerminalApp/CommandlineTest.cpp` (+103 -0) 📝 `src/cascadia/TerminalApp/AppActionHandlers.cpp` (+17 -0) 📝 `src/cascadia/TerminalApp/AppCommandlineArgs.cpp` (+45 -2) 📝 `src/cascadia/TerminalApp/AppCommandlineArgs.h` (+5 -0) 📝 `src/cascadia/TerminalApp/Pane.cpp` (+29 -18) 📝 `src/cascadia/TerminalApp/Pane.h` (+4 -4) 📝 `src/cascadia/TerminalApp/Resources/en-US/Resources.resw` (+10 -0) 📝 `src/cascadia/TerminalApp/TerminalTab.cpp` (+5 -0) 📝 `src/cascadia/TerminalApp/TerminalTab.h` (+3 -2) 📝 `src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp` (+2 -1) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.cpp` (+10 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.h` (+52 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.idl` (+6 -0) 📝 `src/cascadia/TerminalSettingsModel/AllShortcutActions.h` (+29 -27) 📝 `src/cascadia/TerminalSettingsModel/Resources/en-US/Resources.resw` (+4 -0) </details> ### 📄 Description ## 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 * [x] Closes #5803 * [x] Closes #5464 * [x] I work here * [x] Tests added/passed * [ ] Requires documentation to be updated - oh no ## 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:25:08 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27918