terminal icon indicating copy to clipboard operation
terminal copied to clipboard

closeTab should present a confirmation dialog

Open carlos-zamora opened this issue 5 years ago • 6 comments

Description of the new feature/enhancement

closeTab should present a confirmation dialog if multiple panes are open. This would prevent users from accidentally closing all panes in a tab by accident.

carlos-zamora avatar Apr 09 '20 18:04 carlos-zamora

I'd suggest to have this user-configurable so that you could have both a close-without-confirmation command and a close-with-confirmation one and bind them to separate keybinds if you like (e.g. with the latter command bound to combo less fat-finger prone)

eugenesvk avatar Feb 16 '21 18:02 eugenesvk

I had the same request in the linked issue. One suggestion I'd like to mention here is that you should ask the user what to do instead of simply warning the user.

Example

Tab with split-pane: powershell | cmd Question:

What should be closed?
Closing the last tab closes the whole window.

[*this pane*] [tab] [cancel]

htcfreek avatar Apr 18 '21 18:04 htcfreek

Please also make it possible to show a warning on simple tab closing, not only with multiple panes. It happened multiple times to me that I accidentally closed a tab and sometimes there were even processes running inside. I'd prefer to always be warned before closing a tab.

Vampire avatar Jul 05 '23 14:07 Vampire

Yep, I'm pretty sure that's tracked as a part of https://github.com/microsoft/terminal/issues/6549#issuecomment-675494526.

zadjii-msft avatar Jul 05 '23 15:07 zadjii-msft

Same here, I just misclicked and lost one of my tabs with an active SSH connection and ongoing work. At least ask for confirmation if a process (like SSH) is running, closing an "idle" terminal is OK but one that is in use is sad :cry:

tovine avatar Aug 05 '23 20:08 tovine

Is this still being implemented? Its been 5 years and it's still a major issue especially on lower resolution displays with multiple tabs open. The close button takes 50% of the clickable space.

uyen9vba avatar Jun 11 '25 10:06 uyen9vba