Closing the last active terminal does not also close the Vscode terminal pane
Description
More information can be found here where it was originally reported: https://github.com/microsoft/vscode/issues/165067
Steps to reproduce:
- Install vscode
- Install GitLens
- Open the terminal (
Ctrl + `by default) - Click the "trash" icon to close the only active terminal
- Notice that the pane does not close automatically
- Uninstall GitLens and repeat steps 3 & 4
- Notice that now the pane closes
Possibly related to https://github.com/gitkraken/vscode-gitlens/issues/2312
GitLens Version
13.6.0
VS Code Version
Version: 1.78.2 (Universal) Commit: b3e4e68a0bc097f0ae7907b217c1119af9e03435 Date: 2023-05-10T14:44:45.204Z (1 wk ago) Electron: 22.5.2 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Darwin x64 22.4.0 Sandboxed: Yes
Git Version
git version 2.39.2
Logs, Screenshots, Screen Captures, etc
No response
As mentioned here: https://github.com/microsoft/vscode/issues/165067#issuecomment-1557344617, GitLens seems to be triggering this, but it's a VS Code bug.
I'll leave this open for now, but I don't see what GitLens could be doing to cause this never mind stop doing to avoid it.
I started having this problem recently too, given it was recent I started diffing the ~/.config/Code files against last week's backup.
Tracked it down to a configuration value in ~/.config/Code/User/globalStorate/state.vscdb. Specifically, it seems to be a corrupted views.customizations setting (SELECT * FROM ItemTable WHERE key="views.customizations";).
Reverting this row to the backup resolved the issue. Deleting the row entirely also resolved the issue.
For reference, the corrupted row data that was causing this bug was:
{"viewContainerLocations":{},"viewLocations":{"gitlens.views.graph":"terminal","gitlens.views.graphDetails":"terminal"},"viewContainerBadgeEnablementStates":{}}
Unfortunately the vscode issue has been closed now and locked now, as this could be useful debugging information for both parties.
@eamodio Is this still blocked?
@JosiahBull I'm not aware of anything changing from the VS Code side. Though GitLens is moving away (sadly slowly) from using the terminal to execute commands, so hopefully soon it won't be an issue anymore.