Add a switch to disable closing a tab if it is not active #17433

Closed
opened 2026-01-31 05:42:20 +00:00 by claunia · 3 comments
Owner

Originally created by @trajano on GitHub (May 9, 2022).

Description of the new feature/enhancement

Sometimes when switching tabs, I accidentally hit the close button when I am expecting to switch tabs. I am asking if we can add a switch that is disabled by default to disable closing the tab if is it not presently active, as such if I want to close an inactive tab I have to press the close button twice.

Proposed technical implementation details (optional)

Assuming the setting is present. It's a matter of

on close tab
  if not active
    return or just set tab to foreground
  else 
   close the tab
  endif
Originally created by @trajano on GitHub (May 9, 2022). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement Sometimes when switching tabs, I accidentally hit the close button when I am expecting to switch tabs. I am asking if we can add a switch that is disabled by default to disable closing the tab if is it not presently active, as such if I want to close an inactive tab I have to press the close button twice. # Proposed technical implementation details (optional) Assuming the setting is present. It's a matter of ``` on close tab if not active return or just set tab to foreground else close the tab endif ```
claunia added the Issue-FeatureNeeds-TriageNeeds-AttentionResolution-Duplicate labels 2026-01-31 05:42:20 +00:00
Author
Owner

@zadjii-msft commented on GitHub (May 16, 2022):

Huh. This seems like a variation on #3335. In addition to the proposed

"tab.showCloseButton": "always"|"hover"|"never"

maybe something like "tab.showCloseButton": "active" to make it only visible when the tab is the active tab? That has the added complication though - is there a activeAndHover version? inactiveAndHover? activeNoHover? That might be too complicated.

Maybe the better solution is just some version of the warnings proposed in https://github.com/microsoft/terminal/issues/6549#issuecomment-675494526. Does that seem like a viable solution to this workflow/?

@zadjii-msft commented on GitHub (May 16, 2022): Huh. This seems like a variation on #3335. In addition to the proposed ``` "tab.showCloseButton": "always"|"hover"|"never" ``` maybe something like `"tab.showCloseButton": "active"` to make it only visible when the tab is the active tab? That has the added complication though - is there a `activeAndHover` version? `inactiveAndHover`? `activeNoHover`? That might be too complicated. Maybe the better solution is just some version of the warnings proposed in https://github.com/microsoft/terminal/issues/6549#issuecomment-675494526. Does that seem like a viable solution to this workflow/?
Author
Owner

@trajano commented on GitHub (May 16, 2022):

I think we can merge this into one user story that collects all of the scenarios and lists it out like https://github.com/microsoft/terminal/issues/6549#issuecomment-675494526

@trajano commented on GitHub (May 16, 2022): I think we can merge this into one user story that collects all of the scenarios and lists it out like https://github.com/microsoft/terminal/issues/6549#issuecomment-675494526
Author
Owner

@trajano commented on GitHub (May 16, 2022):

merge with #3335 and #6549 please

@trajano commented on GitHub (May 16, 2022): merge with #3335 and #6549 please
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17433