[PR #7176] Add closeOtherTabs, closeTabsAfter actions #26862

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

Original Pull Request: https://github.com/microsoft/terminal/pull/7176

State: closed
Merged: Yes


Summary of the Pull Request

Adds support for two actions, closeOtherTabs and closeTabsAfter. Both these actions accept an index parameter.

  • closeOtherTabs: Close tabs other than index
  • closeTabsAfter: Close tabs after index (This is also "Close tabs to the right")

References

  • This PR is being made to unblock @RahulRavishankar in #1912

PR Checklist

  • I work here
  • Tests added/passed
  • Requires documentation to be updated
  • We should file an issue for "add an index param to closeTab" to add similar support to the close tab action
  • We should file an issue for "make the index param to closeOtherTabs, closeTabsAfter optional" to make them both work on the active tab when there's no index provided

Validation Steps Performed

  • Verified that closing all tabs when I have the index'th tab selected works as expected
  • Verified that closing all tabs when I have a tab other than the index'th tab selected works as expected
  • Verified that closing tabs to the right when I have the index'th tab selected works as expected
  • Verified that closing tabs to the right when I have a tab other than the index'th tab selected works as expected
    • This one has one caveat: for whatever reason, if you run this action when the tab that's currently focused is before the index param, then the tabs will expand to fill the entire width of the tab row, until you mouse over them. Probably has something to do with tabs not resizing down until there's a mouse exit event.
**Original Pull Request:** https://github.com/microsoft/terminal/pull/7176 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request Adds support for two actions, `closeOtherTabs` and `closeTabsAfter`. Both these actions accept an `index` parameter. * `closeOtherTabs`: Close tabs other than `index` * `closeTabsAfter`: Close tabs after `index` (This is also "Close tabs to the right") ## References * This PR is being made to unblock @RahulRavishankar in #1912 ## PR Checklist * [x] I work here * [ ] Tests added/passed * [x] Requires documentation to be updated * [ ] We should file an issue for "add an `index` param to `closeTab`" to add similar support to the close tab action * [ ] We should file an issue for "make the `index` param to `closeOtherTabs`, `closeTabsAfter` optional" to make them both work on the _active_ tab when there's no `index` provided ## Validation Steps Performed * _Verified that_ closing all tabs when I have the `index`'th tab selected _works as expected_ * _Verified that_ closing all tabs when I have a tab other than the `index`'th tab selected _works as expected_ * _Verified that_ closing tabs to the right when I have the `index`'th tab selected _works as expected_ * _Verified that_ closing tabs to the right when I have a tab other than the `index`'th tab selected _works as expected_ - This one has one caveat: for whatever reason, if you run this action when the tab that's currently focused is _before_ the `index` param, then the tabs will expand to fill the entire width of the tab row, until you mouse over them. Probably has something to do with tabs not resizing down until there's a mouse exit event.
claunia added the pull-request label 2026-01-31 09:18:34 +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#26862