Avoid closing window when close last tab. #8704

Open
opened 2026-01-31 01:35:58 +00:00 by claunia · 13 comments
Owner

Originally created by @aixfox on GitHub (May 30, 2020).

Description of the new feature/enhancement

Avoid closing window when close last tab.

Proposed technical implementation details (optional)

Keep terminal window when 0 tabs exist, not be concern about the last tab how to be closed.

Features/News/Terminal list, are good contents in the empty window view.

Like Firefox/Chrome/ConEmu which is popular tab manager does.

Originally created by @aixfox on GitHub (May 30, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 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 Avoid closing window when close last tab. <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> # Proposed technical implementation details (optional) Keep terminal window when 0 tabs exist, not be concern about the last tab how to be closed. Features/News/Terminal list, are good contents in the empty window view. Like Firefox/Chrome/ConEmu which is popular tab manager does. <!-- A clear and concise description of what you want to happen. -->
claunia added the Issue-FeatureProduct-TerminalArea-UserInterface labels 2026-01-31 01:35:58 +00:00
Author
Owner

@electronic-dk commented on GitHub (May 30, 2020):

I believe this issue covers exactly this

@electronic-dk commented on GitHub (May 30, 2020): I believe this [issue](https://github.com/microsoft/terminal/issues/4579) covers exactly this
Author
Owner

@aixfox commented on GitHub (May 30, 2020):

I believe this issue covers exactly this

Same proposal in a sense.

But views of #4579 #2976 #627 are tabs, not window, they are different concepts. Behavior confirm or prevent of tabs are meaningless.

@aixfox commented on GitHub (May 30, 2020): > > > I believe this [issue](https://github.com/microsoft/terminal/issues/4579) covers exactly this Same proposal in a sense. But views of #4579 #2976 #627 are tabs, not window, they are different concepts. Behavior confirm or prevent of tabs are meaningless.
Author
Owner

@zadjii-msft commented on GitHub (Jun 1, 2020):

I actually don't hate this. But we'd probably need to get something like #3586 in first, so that we could just re-use that UI as the "pick a profile" UI.

@zadjii-msft commented on GitHub (Jun 1, 2020): I actually don't hate this. But we'd probably need to get something like #3586 in first, so that we could just re-use that UI as the "pick a profile" UI.
Author
Owner

@WSLUser commented on GitHub (Jun 2, 2020):

I expect the window to close when there is only one tab open and I close it (the last tab as I see it). I have no idea what would still show in the window if there are 0 tabs, perhaps a black empty space that supports no input other than opening a new tab via drop-down menu? This doesn't seem all that useful to me and actually a deterrent. I wouldn't close Terminal without good reason, such as a reboot or adding a WSL distro since we're still waiting for support on hot-loading distros that are added to the profile list (and appearing in the drop-down menu.) If this "feature" is added, I recommend it be disabled by default and be explicitly turned on in settings.json under "defaults".

@WSLUser commented on GitHub (Jun 2, 2020): I expect the window to close when there is only one tab open and I close it (the last tab as I see it). I have no idea what would still show in the window if there are 0 tabs, perhaps a black empty space that supports no input other than opening a new tab via drop-down menu? This doesn't seem all that useful to me and actually a deterrent. I wouldn't close Terminal without good reason, such as a reboot or adding a WSL distro since we're still waiting for support on hot-loading distros that are added to the profile list (and appearing in the drop-down menu.) If this "feature" is added, I recommend it be disabled by default and be explicitly turned on in settings.json under "defaults".
Author
Owner

@aixfox commented on GitHub (Jun 3, 2020):

I expect the window to close when there is only one tab open and I close it (the last tab as I see it). I have no idea what would still show in the window if there are 0 tabs, perhaps a black empty space that supports no input other than opening a new tab via drop-down menu? This doesn't seem all that useful to me and actually a deterrent. I wouldn't close Terminal without good reason, such as a reboot or adding a WSL distro since we're still waiting for support on hot-loading distros that are added to the profile list (and appearing in the drop-down menu.) If this "feature" is added, I recommend it be disabled by default and be explicitly turned on in settings.json under "defaults".

Here is a user story:
Close a tab -> Open other tabs.
If the window is not opened always and the tab closed is the latest, user should do:
Close a tab -> Find "Windows Terminal" application in OS -> Open default tab (default behavoir) -> Open other tabs -> Close unnecessary default tab.

It is confused.

Most browsers/editors/ternimal managers support this requirement, and their blank pages are helpful for what would be rendered in Windows Ternimal with 0 tabs.

@aixfox commented on GitHub (Jun 3, 2020): > > > I expect the window to close when there is only one tab open and I close it (the last tab as I see it). I have no idea what would still show in the window if there are 0 tabs, perhaps a black empty space that supports no input other than opening a new tab via drop-down menu? This doesn't seem all that useful to me and actually a deterrent. I wouldn't close Terminal without good reason, such as a reboot or adding a WSL distro since we're still waiting for support on hot-loading distros that are added to the profile list (and appearing in the drop-down menu.) If this "feature" is added, I recommend it be disabled by default and be explicitly turned on in settings.json under "defaults". Here is a user story: Close a tab -> Open other tabs. If the window is not opened always and the tab closed is the latest, user should do: Close a tab -> Find "Windows Terminal" application in OS -> Open default tab (default behavoir) -> Open other tabs -> Close unnecessary default tab. It is confused. Most browsers/editors/ternimal managers support this requirement, and their blank pages are helpful for what would be rendered in Windows Ternimal with 0 tabs.
Author
Owner

@WSLUser commented on GitHub (Jun 3, 2020):

Browsers are different. I haven't seen a terminal have this feature. Please state precedence (i.e. in VTE/xterm/Iterm2/etc. this works ).

@WSLUser commented on GitHub (Jun 3, 2020): Browsers are different. I haven't seen a terminal have this feature. Please state precedence (i.e. in VTE/xterm/Iterm2/etc. this works ).
Author
Owner

@aixfox commented on GitHub (Jun 3, 2020):

Browsers are different. I haven't seen a terminal have this feature. Please state precedence (i.e. in VTE/xterm/Iterm2/etc. this works ).

Managers of terminal, not terminal itself.

Here are some products: ConEmu/XShell/Terminus/MobaXterm.

@aixfox commented on GitHub (Jun 3, 2020): > > > Browsers are different. I haven't seen a terminal have this feature. Please state precedence (i.e. in VTE/xterm/Iterm2/etc. this works ). Managers of terminal, not terminal itself. Here are some products: ConEmu/XShell/Terminus/MobaXterm.
Author
Owner

@zadjii-msft commented on GitHub (Jun 3, 2020):

Browsers are different. I haven't seen a terminal have this feature. Please state precedence (i.e. in VTE/xterm/Iterm2/etc. this works ).

I don't think there needs to be existing precedence for Terminal UI features like this. For something like VT sequence support, sure. However, I like this idea as a differentiating one.

Obviously this would be behind a setting, because most people probably just want the window to close when the last tab is closed, but giving the users the option for this functionality isn't a bad idea.

@zadjii-msft commented on GitHub (Jun 3, 2020): > Browsers are different. I haven't seen a terminal have this feature. Please state precedence (i.e. in VTE/xterm/Iterm2/etc. this works ). I don't think there _needs_ to be existing precedence for Terminal UI features like this. For something like VT sequence support, sure. However, I like this idea as a differentiating one. Obviously this would be behind a setting, because most people probably just want the window to close when the last tab is closed, but giving the users the option for this functionality isn't a bad idea.
Author
Owner

@WSLUser commented on GitHub (Jun 3, 2020):

I actually do remember ConEmu having the feature. It was annoying for me and was glad when I could switch to Terminal. I'm glad this wouldn't be the default and instead an explicit setting.

@WSLUser commented on GitHub (Jun 3, 2020): I actually do remember ConEmu having the feature. It was annoying for me and was glad when I could switch to Terminal. I'm glad this wouldn't be the default and instead an explicit setting.
Author
Owner

@aixfox commented on GitHub (Jun 6, 2020):

ok, just a setting feature request.

@aixfox commented on GitHub (Jun 6, 2020): ok, just a setting feature request.
Author
Owner

@DHowett commented on GitHub (Jun 6, 2020):

This is definitely a duplicate of 4579 (if you read the comments), but this one has more info so I’m closing the other one.

@DHowett commented on GitHub (Jun 6, 2020): This is definitely a duplicate of 4579 (if you read the comments), but this one has more info so I’m closing the other one.
Author
Owner

@ndac-todoroki commented on GitHub (Jun 19, 2020):

I use Konsole when I use Kubuntu, and Konsole has this feature (actually I'm using Yakuake, the quake-typed version of Konsole).
Avoid closing window is great especially on quake mode, where the application should always be alive (so you can show/hide the terminal window by a global hotkey).
Currently there is no quake mode on Windows Terminal, but there are some go-arounds using AutoHotkey, which I am using. The AH script doesn't work when Windows Terminal is closed.

Also, I usually just close the tab when I need to re-login on WSL2. Maybe this isn't the best way to do it?

@ndac-todoroki commented on GitHub (Jun 19, 2020): I use Konsole when I use Kubuntu, and Konsole has this feature (actually I'm using Yakuake, the quake-typed version of Konsole). Avoid closing window is great especially on quake mode, where the application should always be alive (so you can show/hide the terminal window by a global hotkey). Currently there is no quake mode on Windows Terminal, but there are some go-arounds using AutoHotkey, which I am using. The AH script doesn't work when Windows Terminal is closed. Also, I usually just close the tab when I need to re-login on WSL2. Maybe this isn't the best way to do it?
Author
Owner

@Titan21 commented on GitHub (Sep 30, 2025):

Hi, I know I'm a bit late to the party - but any update on this?
I've had a look around and couldn't find a setting for this.
So I don't think this has been implemented yet?

@Titan21 commented on GitHub (Sep 30, 2025): Hi, I know I'm a bit late to the party - but any update on this? I've had a look around and couldn't find a setting for this. So I don't think this has been implemented yet?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8704