[PR #9507] [MERGED] Allow overriding tab switcher mode on command level #27602

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/9507
Author: @Don-Vito
Created: 3/15/2021
Status: Merged
Merged: 3/23/2021
Merged by: @undefined

Base: mainHead: 9330-override-tabswitcher-mode


📝 Commits (5)

  • 60e086c Allow overriding tab switcher mode on command level
  • fa821d3 Update json schema with pre/next tab action args
  • fb14245 Fix typo
  • 9b43ff8 Eliminate SwitchToAdjacentTabArgs
  • 624c599 Extract schema definition to allow reuse

📊 Changes

10 files changed (+177 additions, -23 deletions)

View changed files

📝 doc/cascadia/profiles.schema.json (+47 -0)
📝 src/cascadia/LocalTests_TerminalApp/TabTests.cpp (+5 -9)
📝 src/cascadia/TerminalApp/AppActionHandlers.cpp (+12 -4)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+2 -2)
📝 src/cascadia/TerminalApp/TerminalPage.h (+1 -1)
📝 src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp (+2 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.cpp (+24 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.h (+67 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.idl (+17 -0)
📝 src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl (+0 -7)

📄 Description

Summary of the Pull Request

Currently, when the MRU is enabled we lose the keybinding allowing us to
go forward/backward (aka right/left in LTR) in the tab view.

To fix that, this PR introduces "tabSwitcherMode" optional parameter to
the prevTab / nextTab commands.
If it is not provided the global setting will be used.

So if you want to go to adjacent tabs, even if MRU is enabled on the
system level you can use:

{ "command": { "action": "prevTab", "tabSwitcherMode": "inOrder" }, "keys": "ctrl+f1"}
{ "command": { "action": "nextTab", "tabSwitcherMode": "inOrder" }, "keys": "ctrl+f2"}

or even

{"command": { "action": "prevTab", "tabSwitcherMode": "disabled" }, "keys": "ctrl+f1"}
{ "command": { "action": "nextTab", "tabSwitcherMode": "disabled" }, "keys": "ctrl+f2"}

if you don't want tab switcher to show up

PR Checklist


🔄 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/9507 **Author:** [@Don-Vito](https://github.com/Don-Vito) **Created:** 3/15/2021 **Status:** ✅ Merged **Merged:** 3/23/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `9330-override-tabswitcher-mode` --- ### 📝 Commits (5) - [`60e086c`](https://github.com/microsoft/terminal/commit/60e086ca72eb115c846469db4cd5aff5c65df31e) Allow overriding tab switcher mode on command level - [`fa821d3`](https://github.com/microsoft/terminal/commit/fa821d3aa616ad14742b935b0de86e67c148fee1) Update json schema with pre/next tab action args - [`fb14245`](https://github.com/microsoft/terminal/commit/fb14245356d7aa1836b3dc7afc8c3acce9b393a6) Fix typo - [`9b43ff8`](https://github.com/microsoft/terminal/commit/9b43ff88358b7c8eb3237b8572fc3f195922cd53) Eliminate SwitchToAdjacentTabArgs - [`624c599`](https://github.com/microsoft/terminal/commit/624c599e0e932e7dcb11f936c605087a6d18d5b9) Extract schema definition to allow reuse ### 📊 Changes **10 files changed** (+177 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `doc/cascadia/profiles.schema.json` (+47 -0) 📝 `src/cascadia/LocalTests_TerminalApp/TabTests.cpp` (+5 -9) 📝 `src/cascadia/TerminalApp/AppActionHandlers.cpp` (+12 -4) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+2 -2) 📝 `src/cascadia/TerminalApp/TerminalPage.h` (+1 -1) 📝 `src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp` (+2 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.cpp` (+24 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.h` (+67 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.idl` (+17 -0) 📝 `src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl` (+0 -7) </details> ### 📄 Description ## Summary of the Pull Request Currently, when the MRU is enabled we lose the keybinding allowing us to go forward/backward (aka right/left in LTR) in the tab view. To fix that, this PR introduces "tabSwitcherMode" optional parameter to the prevTab / nextTab commands. If it is not provided the global setting will be used. So if you want to go to adjacent tabs, even if MRU is enabled on the system level you can use: ``` { "command": { "action": "prevTab", "tabSwitcherMode": "inOrder" }, "keys": "ctrl+f1"} { "command": { "action": "nextTab", "tabSwitcherMode": "inOrder" }, "keys": "ctrl+f2"} ``` or even ``` {"command": { "action": "prevTab", "tabSwitcherMode": "disabled" }, "keys": "ctrl+f1"} { "command": { "action": "nextTab", "tabSwitcherMode": "disabled" }, "keys": "ctrl+f2"} ``` if you don't want tab switcher to show up <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes https://github.com/microsoft/terminal/issues/9330 * [x] CLA signed. * [x] Tests added/passed * [ ] Documentation updated - not yet. Waiting for approval. * [x] Schema updated. * [ ] I've discussed this with core contributors already. --- <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:22:56 +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#27602