question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ctrl+W does closes entire window or previous tab, not just the history tab.

See original GitHub issue

When you press Ctrl+W in VSCode it’s supposed to close the active tab. However this does not work for the Git History log window.

Instead, when you only have one tab open showing the Git History and you hit Ctrl+W - the entire VSCode window closes.

Alternatively, when you have more than one tab open but Git History is the active tab, when you hit Ctrl+W - the previously active tab closes along with the Git History tab.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
wayneblosscommented, Dec 31, 2019

Oddly enough, I updated the extension to 0.4.12 in one instance of VS Code and the problem seemed to go away. Then I tried in the other instances and it remained. After I restarted all instances of VS Code, it was back.

I will investigate more, compare to my Mac and Windows machines or check if it is possibly caused just by my VS Code settings.

0reactions
wayneblosscommented, Jan 17, 2020

I found how to reproduce this: Put focus on the VS Code titlebar first.

When you do this while a file tab is open, Ctrl+W closes it properly.

However, when you do this while Git History is the last active tab that is still open, Ctrl+W causes one of two bugs:

  1. If Git History is the only tab open, the entire VS Code instance is closed.
  2. If Git History is not the only tab open, the next most recently active tab gets closed along with Git History.

It seems as though the extension tab is supposed to end processing of Ctrl+W somehow and it doesn’t do that in this case.

I’ve also compared this behavior to some other non-code windows such as: Settings. Details page for an Extension. In each case, even if I click on the VS Code titlebar before hitting Ctrl+W - the correct tab closes.

However, as I type this I decide to try one more: Release notes. This one exhibits the same behavior as Git History.

So far, I’ve only tested this on my Linux (XFCE) desktop. I bet this is really a VS Code issue and that your extension doesn’t even manage anything surrounding window/active tab management. So, I’ll just leave my notes here for now.

P.S. I don’t have any other extensions that create their own document tab to test against… P.P.S. It’s even more likely an XFCE issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's the logic behind the "W" in Control+W to close a Tab in ...
Keyboard Shortcuts for Internet Explorer 8: Close current tab (or the current window if tabbed browsing is disabled) - Ctrl + W.
Read more >
Ctrl W not close app - MozillaWiki
Ctrl +W will close the selected tab, as per currently, until only one tab is left. When that tab is left, Ctrl+W will...
Read more >
47134 - Command-W Sometimes (random occurrence) closes ...
Issue 47134: Command-W Sometimes (random occurrence) closes entire window ... It is not specifically the window closing - but multiple tabs are closed...
Read more >
Chrome keyboard shortcuts - Computer - Google Chrome Help
Windows & Linux ; Open your home page in the current tab, Alt + Home ; Open the previous page from your browsing...
Read more >
Short cut CTRL W closes the browser instead of closing an ...
Short cut CTRL W closes the browser instead of closing an active application tab. ... This thread is locked. You can follow the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found