[PR #10651] Clamp the focusTab action to the number of available tabs #28171

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

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

State: closed
Merged: Yes


Summary of the Pull Request

When we perform a focusTab action, we currently do nothing if the parameter was greater than the number of tabs. This PR changes that behavior. Now, focus-tab -t 999999 will always focus the last tab, instead of silently doing nothing.

PR Checklist

Validation Steps Performed

  • ran tests
  • validated commandline manually
**Original Pull Request:** https://github.com/microsoft/terminal/pull/10651 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request When we perform a `focusTab` action, we currently do nothing if the parameter was greater than the number of tabs. This PR changes that behavior. Now, `focus-tab -t 999999` will always focus the last tab, instead of silently doing nothing. ## PR Checklist * [x] Closes #9369 * [x] I work here * [x] Tests added/passed * [n/a] Requires documentation to be updated ## Validation Steps Performed * [x] ran tests * [x] validated commandline manually
claunia added the pull-request label 2026-01-31 09:26:45 +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#28171