[PR #10447] [MERGED] Allow closing tabs by index #28057

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/10447
Author: @ianjoneill
Created: 6/17/2021
Status: ✅ Merged
Merged: 6/25/2021
Merged by: @undefined

Base: main ← Head: f-close-tab-at-index


📝 Commits (4)

  • f5d8d6f Allow closing tabs by index
  • 1dcf573 Merge branch 'main' into f-close-tab-at-index
  • 571cc1a Address review comments
  • bf6c3de Address a couple more comments

📊 Changes

10 files changed (+162 additions, -43 deletions)

View changed files

📝 doc/cascadia/profiles.schema.json (+20 -0)
📝 src/cascadia/TerminalApp/AppActionHandlers.cpp (+20 -2)
📝 src/cascadia/TerminalApp/TabManagement.cpp (+14 -11)
📝 src/cascadia/TerminalApp/TerminalPage.h (+1 -1)
📝 src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp (+1 -1)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.cpp (+14 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.h (+53 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.idl (+6 -0)
📝 src/cascadia/TerminalSettingsModel/AllShortcutActions.h (+1 -0)
📝 src/cascadia/TerminalSettingsModel/Resources/en-US/Resources.resw (+32 -28)

📄 Description

Summary of the Pull Request

Updates the closeTab action to optionally take an index.

PR Checklist

Validation Steps Performed

Added the following configuration to settings.json and validated both key combinations behaved as expected. Also opened the command palette and ensured that the actions were displayed.

{ "command": "closeTab", "keys": "ctrl+shift+delete" },
{ "command": { "action": "closeTab", "index": 0 }, "keys": "ctrl+shift+end" }

🔄 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/10447 **Author:** [@ianjoneill](https://github.com/ianjoneill) **Created:** 6/17/2021 **Status:** ✅ Merged **Merged:** 6/25/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `f-close-tab-at-index` --- ### 📝 Commits (4) - [`f5d8d6f`](https://github.com/microsoft/terminal/commit/f5d8d6f0468f82308e6bf35436dd4fa64aaeca37) Allow closing tabs by index - [`1dcf573`](https://github.com/microsoft/terminal/commit/1dcf573a6b324b188e768a441bb7e4e9cce3ef44) Merge branch 'main' into f-close-tab-at-index - [`571cc1a`](https://github.com/microsoft/terminal/commit/571cc1a6b19f53c40a6f3640a3ed6d9deb1beb73) Address review comments - [`bf6c3de`](https://github.com/microsoft/terminal/commit/bf6c3ded218219ea5561e80377a4c8aebdc59dbf) Address a couple more comments ### 📊 Changes **10 files changed** (+162 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `doc/cascadia/profiles.schema.json` (+20 -0) 📝 `src/cascadia/TerminalApp/AppActionHandlers.cpp` (+20 -2) 📝 `src/cascadia/TerminalApp/TabManagement.cpp` (+14 -11) 📝 `src/cascadia/TerminalApp/TerminalPage.h` (+1 -1) 📝 `src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp` (+1 -1) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.cpp` (+14 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.h` (+53 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.idl` (+6 -0) 📝 `src/cascadia/TerminalSettingsModel/AllShortcutActions.h` (+1 -0) 📝 `src/cascadia/TerminalSettingsModel/Resources/en-US/Resources.resw` (+32 -28) </details> ### 📄 Description ## Summary of the Pull Request Updates the `closeTab` action to optionally take an index. ## PR Checklist * [x] Closes #7180 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [x] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: MicrosoftDocs/terminal#347 * [x] Schema updated. * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx ## Validation Steps Performed Added the following configuration to `settings.json` and validated both key combinations behaved as expected. Also opened the command palette and ensured that the actions were displayed. ```json { "command": "closeTab", "keys": "ctrl+shift+delete" }, { "command": { "action": "closeTab", "index": 0 }, "keys": "ctrl+shift+end" } ``` --- <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:26:02 +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#28057